/* Issue #2842: three appearance palettes. Current uses the original CSS unchanged.
   Explicit utility overrides cover classes rendered from both static HTML and JS. */

/* Dark palette */
html[data-theme="dark"] .bg-gray-500 { background-color: #40536d !important; }
html[data-theme="dark"] .bg-gray-500\/20 { background-color: rgba(64, 83, 109, 0.2) !important; }
html[data-theme="dark"] .bg-gray-500\/60 { background-color: rgba(64, 83, 109, 0.6) !important; }
html[data-theme="dark"] .bg-gray-600 { background-color: #293b55 !important; }
html[data-theme="dark"] .bg-gray-600\/40 { background-color: rgba(41, 59, 85, 0.4) !important; }
html[data-theme="dark"] .bg-gray-700 { background-color: #1b2b43 !important; }
html[data-theme="dark"] .bg-gray-700\/40 { background-color: rgba(27, 43, 67, 0.4) !important; }
html[data-theme="dark"] .bg-gray-700\/50 { background-color: rgba(27, 43, 67, 0.5) !important; }
html[data-theme="dark"] .bg-gray-700\/60 { background-color: rgba(27, 43, 67, 0.6) !important; }
html[data-theme="dark"] .bg-gray-800 { background-color: #101d31 !important; }
html[data-theme="dark"] .bg-gray-800\/20 { background-color: rgba(16, 29, 49, 0.2) !important; }
html[data-theme="dark"] .bg-gray-800\/30 { background-color: rgba(16, 29, 49, 0.3) !important; }
html[data-theme="dark"] .bg-gray-800\/40 { background-color: rgba(16, 29, 49, 0.4) !important; }
html[data-theme="dark"] .bg-gray-800\/50 { background-color: rgba(16, 29, 49, 0.5) !important; }
html[data-theme="dark"] .bg-gray-800\/60 { background-color: rgba(16, 29, 49, 0.6) !important; }
html[data-theme="dark"] .bg-gray-800\/70 { background-color: rgba(16, 29, 49, 0.7) !important; }
html[data-theme="dark"] .bg-gray-800\/80 { background-color: rgba(16, 29, 49, 0.8) !important; }
html[data-theme="dark"] .bg-gray-900 { background-color: #0b1220 !important; }
html[data-theme="dark"] .bg-gray-900\/30 { background-color: rgba(11, 18, 32, 0.3) !important; }
html[data-theme="dark"] .bg-gray-900\/40 { background-color: rgba(11, 18, 32, 0.4) !important; }
html[data-theme="dark"] .bg-gray-900\/50 { background-color: rgba(11, 18, 32, 0.5) !important; }
html[data-theme="dark"] .bg-gray-900\/60 { background-color: rgba(11, 18, 32, 0.6) !important; }
html[data-theme="dark"] .bg-gray-900\/80 { background-color: rgba(11, 18, 32, 0.8) !important; }
html[data-theme="dark"] .border-gray-500 { border-color: #61718a !important; }
html[data-theme="dark"] .border-gray-600 { border-color: #425875 !important; }
html[data-theme="dark"] .border-gray-600\/40 { border-color: rgba(66, 88, 117, 0.4) !important; }
html[data-theme="dark"] .border-gray-600\/50 { border-color: rgba(66, 88, 117, 0.5) !important; }
html[data-theme="dark"] .border-gray-700 { border-color: #2e4360 !important; }
html[data-theme="dark"] .border-gray-700\/30 { border-color: rgba(46, 67, 96, 0.3) !important; }
html[data-theme="dark"] .border-gray-700\/40 { border-color: rgba(46, 67, 96, 0.4) !important; }
html[data-theme="dark"] .border-gray-700\/50 { border-color: rgba(46, 67, 96, 0.5) !important; }
html[data-theme="dark"] .border-gray-700\/60 { border-color: rgba(46, 67, 96, 0.6) !important; }
html[data-theme="dark"] .border-gray-700\/80 { border-color: rgba(46, 67, 96, 0.8) !important; }
html[data-theme="dark"] .border-gray-800 { border-color: #20324c !important; }
html[data-theme="dark"] .border-gray-800\/40 { border-color: rgba(32, 50, 76, 0.4) !important; }
html[data-theme="dark"] .border-gray-800\/50 { border-color: rgba(32, 50, 76, 0.5) !important; }
html[data-theme="dark"] .border-gray-800\/60 { border-color: rgba(32, 50, 76, 0.6) !important; }
html[data-theme="dark"] .disabled\:text-gray-500:disabled { color: #92a2b8 !important; }
html[data-theme="dark"] .divide-gray-600 > :not([hidden]) ~ :not([hidden]) { border-color: #425875 !important; }
html[data-theme="dark"] .divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: #2e4360 !important; }
html[data-theme="dark"] .divide-gray-700\/40 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(46, 67, 96, 0.4) !important; }
html[data-theme="dark"] .divide-gray-700\/50 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(46, 67, 96, 0.5) !important; }
html[data-theme="dark"] .divide-gray-800 > :not([hidden]) ~ :not([hidden]) { border-color: #20324c !important; }
html[data-theme="dark"] .hover\:bg-gray-500:hover { background-color: #40536d !important; }
html[data-theme="dark"] .hover\:bg-gray-600:hover { background-color: #293b55 !important; }
html[data-theme="dark"] .hover\:bg-gray-600\/50:hover { background-color: rgba(41, 59, 85, 0.5) !important; }
html[data-theme="dark"] .hover\:bg-gray-700:hover { background-color: #1b2b43 !important; }
html[data-theme="dark"] .hover\:bg-gray-700\/20:hover { background-color: rgba(27, 43, 67, 0.2) !important; }
html[data-theme="dark"] .hover\:bg-gray-700\/30:hover { background-color: rgba(27, 43, 67, 0.3) !important; }
html[data-theme="dark"] .hover\:bg-gray-700\/40:hover { background-color: rgba(27, 43, 67, 0.4) !important; }
html[data-theme="dark"] .hover\:bg-gray-700\/50:hover { background-color: rgba(27, 43, 67, 0.5) !important; }
html[data-theme="dark"] .hover\:bg-gray-800:hover { background-color: #101d31 !important; }
html[data-theme="dark"] .hover\:bg-gray-800\/40:hover { background-color: rgba(16, 29, 49, 0.4) !important; }
html[data-theme="dark"] .hover\:bg-gray-800\/50:hover { background-color: rgba(16, 29, 49, 0.5) !important; }
html[data-theme="dark"] .hover\:bg-gray-800\/60:hover { background-color: rgba(16, 29, 49, 0.6) !important; }
html[data-theme="dark"] .hover\:border-gray-500:hover { border-color: #61718a !important; }
html[data-theme="dark"] .hover\:border-gray-600:hover { border-color: #425875 !important; }
html[data-theme="dark"] .hover\:text-gray-100:hover { color: #f4f7fb !important; }
html[data-theme="dark"] .hover\:text-gray-200:hover { color: #e3eaf3 !important; }
html[data-theme="dark"] .hover\:text-gray-300:hover { color: #d2dbe8 !important; }
html[data-theme="dark"] .hover\:text-gray-400:hover { color: #afbdd0 !important; }
html[data-theme="dark"] .text-gray-100 { color: #f4f7fb !important; }
html[data-theme="dark"] .text-gray-200 { color: #e3eaf3 !important; }
html[data-theme="dark"] .text-gray-300 { color: #d2dbe8 !important; }
html[data-theme="dark"] .text-gray-400 { color: #afbdd0 !important; }
html[data-theme="dark"] .text-gray-500 { color: #92a2b8 !important; }
html[data-theme="dark"] .text-gray-600 { color: #75869e !important; }

/* Light palette */
html[data-theme="light"] .bg-blue-700 { background-color: #2563eb !important; }
html[data-theme="light"] .bg-blue-900 { background-color: #dbeafe !important; }
html[data-theme="light"] .bg-blue-900\/10 { background-color: rgba(219, 234, 254, 0.1) !important; }
html[data-theme="light"] .bg-blue-900\/20 { background-color: rgba(219, 234, 254, 0.2) !important; }
html[data-theme="light"] .bg-blue-900\/25 { background-color: rgba(219, 234, 254, 0.25) !important; }
html[data-theme="light"] .bg-blue-900\/30 { background-color: rgba(219, 234, 254, 0.3) !important; }
html[data-theme="light"] .bg-blue-900\/40 { background-color: rgba(219, 234, 254, 0.4) !important; }
html[data-theme="light"] .bg-blue-900\/50 { background-color: rgba(219, 234, 254, 0.5) !important; }
html[data-theme="light"] .bg-blue-900\/60 { background-color: rgba(219, 234, 254, 0.6) !important; }
html[data-theme="light"] .bg-gray-500 { background-color: #c9d3e0 !important; }
html[data-theme="light"] .bg-gray-500\/20 { background-color: rgba(201, 211, 224, 0.2) !important; }
html[data-theme="light"] .bg-gray-500\/60 { background-color: rgba(201, 211, 224, 0.6) !important; }
html[data-theme="light"] .bg-gray-600 { background-color: #dce4ee !important; }
html[data-theme="light"] .bg-gray-600\/40 { background-color: rgba(220, 228, 238, 0.4) !important; }
html[data-theme="light"] .bg-gray-700 { background-color: #e9eef5 !important; }
html[data-theme="light"] .bg-gray-700\/40 { background-color: rgba(233, 238, 245, 0.4) !important; }
html[data-theme="light"] .bg-gray-700\/50 { background-color: rgba(233, 238, 245, 0.5) !important; }
html[data-theme="light"] .bg-gray-700\/60 { background-color: rgba(233, 238, 245, 0.6) !important; }
html[data-theme="light"] .bg-gray-800 { background-color: #ffffff !important; }
html[data-theme="light"] .bg-gray-800\/20 { background-color: rgba(255, 255, 255, 0.2) !important; }
html[data-theme="light"] .bg-gray-800\/30 { background-color: rgba(255, 255, 255, 0.3) !important; }
html[data-theme="light"] .bg-gray-800\/40 { background-color: rgba(255, 255, 255, 0.4) !important; }
html[data-theme="light"] .bg-gray-800\/50 { background-color: rgba(255, 255, 255, 0.5) !important; }
html[data-theme="light"] .bg-gray-800\/60 { background-color: rgba(255, 255, 255, 0.6) !important; }
html[data-theme="light"] .bg-gray-800\/70 { background-color: rgba(255, 255, 255, 0.7) !important; }
html[data-theme="light"] .bg-gray-800\/80 { background-color: rgba(255, 255, 255, 0.8) !important; }
html[data-theme="light"] .bg-gray-900 { background-color: #f8fafc !important; }
html[data-theme="light"] .bg-gray-900\/30 { background-color: rgba(248, 250, 252, 0.3) !important; }
html[data-theme="light"] .bg-gray-900\/40 { background-color: rgba(248, 250, 252, 0.4) !important; }
html[data-theme="light"] .bg-gray-900\/50 { background-color: rgba(248, 250, 252, 0.5) !important; }
html[data-theme="light"] .bg-gray-900\/60 { background-color: rgba(248, 250, 252, 0.6) !important; }
html[data-theme="light"] .bg-gray-900\/80 { background-color: rgba(248, 250, 252, 0.8) !important; }
html[data-theme="light"] .border-blue-700 { border-color: #3b82f6 !important; }
html[data-theme="light"] .border-blue-700\/40 { border-color: rgba(59, 130, 246, 0.4) !important; }
html[data-theme="light"] .border-blue-700\/50 { border-color: rgba(59, 130, 246, 0.5) !important; }
html[data-theme="light"] .border-blue-800 { border-color: #60a5fa !important; }
html[data-theme="light"] .border-blue-800\/40 { border-color: rgba(96, 165, 250, 0.4) !important; }
html[data-theme="light"] .border-blue-800\/50 { border-color: rgba(96, 165, 250, 0.5) !important; }
html[data-theme="light"] .border-blue-900\/30 { border-color: rgba(147, 197, 253, 0.3) !important; }
html[data-theme="light"] .border-gray-500 { border-color: #94a3b8 !important; }
html[data-theme="light"] .border-gray-600 { border-color: #b9c6d6 !important; }
html[data-theme="light"] .border-gray-600\/40 { border-color: rgba(185, 198, 214, 0.4) !important; }
html[data-theme="light"] .border-gray-600\/50 { border-color: rgba(185, 198, 214, 0.5) !important; }
html[data-theme="light"] .border-gray-700 { border-color: #d3dce8 !important; }
html[data-theme="light"] .border-gray-700\/30 { border-color: rgba(211, 220, 232, 0.3) !important; }
html[data-theme="light"] .border-gray-700\/40 { border-color: rgba(211, 220, 232, 0.4) !important; }
html[data-theme="light"] .border-gray-700\/50 { border-color: rgba(211, 220, 232, 0.5) !important; }
html[data-theme="light"] .border-gray-700\/60 { border-color: rgba(211, 220, 232, 0.6) !important; }
html[data-theme="light"] .border-gray-700\/80 { border-color: rgba(211, 220, 232, 0.8) !important; }
html[data-theme="light"] .border-gray-800 { border-color: #d5deea !important; }
html[data-theme="light"] .border-gray-800\/40 { border-color: rgba(213, 222, 234, 0.4) !important; }
html[data-theme="light"] .border-gray-800\/50 { border-color: rgba(213, 222, 234, 0.5) !important; }
html[data-theme="light"] .border-gray-800\/60 { border-color: rgba(213, 222, 234, 0.6) !important; }
html[data-theme="light"] .disabled\:text-gray-500:disabled { color: #58677e !important; }
html[data-theme="light"] .divide-gray-600 > :not([hidden]) ~ :not([hidden]) { border-color: #b9c6d6 !important; }
html[data-theme="light"] .divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: #d3dce8 !important; }
html[data-theme="light"] .divide-gray-700\/40 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(211, 220, 232, 0.4) !important; }
html[data-theme="light"] .divide-gray-700\/50 > :not([hidden]) ~ :not([hidden]) { border-color: rgba(211, 220, 232, 0.5) !important; }
html[data-theme="light"] .divide-gray-800 > :not([hidden]) ~ :not([hidden]) { border-color: #d5deea !important; }
html[data-theme="light"] .hover\:bg-blue-700:hover { background-color: #2563eb !important; }
html[data-theme="light"] .hover\:bg-gray-500:hover { background-color: #c9d3e0 !important; }
html[data-theme="light"] .hover\:bg-gray-600:hover { background-color: #dce4ee !important; }
html[data-theme="light"] .hover\:bg-gray-600\/50:hover { background-color: rgba(220, 228, 238, 0.5) !important; }
html[data-theme="light"] .hover\:bg-gray-700:hover { background-color: #e9eef5 !important; }
html[data-theme="light"] .hover\:bg-gray-700\/20:hover { background-color: rgba(233, 238, 245, 0.2) !important; }
html[data-theme="light"] .hover\:bg-gray-700\/30:hover { background-color: rgba(233, 238, 245, 0.3) !important; }
html[data-theme="light"] .hover\:bg-gray-700\/40:hover { background-color: rgba(233, 238, 245, 0.4) !important; }
html[data-theme="light"] .hover\:bg-gray-700\/50:hover { background-color: rgba(233, 238, 245, 0.5) !important; }
html[data-theme="light"] .hover\:bg-gray-800:hover { background-color: #ffffff !important; }
html[data-theme="light"] .hover\:bg-gray-800\/40:hover { background-color: rgba(255, 255, 255, 0.4) !important; }
html[data-theme="light"] .hover\:bg-gray-800\/50:hover { background-color: rgba(255, 255, 255, 0.5) !important; }
html[data-theme="light"] .hover\:bg-gray-800\/60:hover { background-color: rgba(255, 255, 255, 0.6) !important; }
html[data-theme="light"] .hover\:border-gray-400:hover { border-color: #94a3b8 !important; }
html[data-theme="light"] .hover\:border-gray-500:hover { border-color: #94a3b8 !important; }
html[data-theme="light"] .hover\:border-gray-600:hover { border-color: #b9c6d6 !important; }
html[data-theme="light"] .hover\:text-blue-200:hover { color: #1e40af !important; }
html[data-theme="light"] .hover\:text-blue-300:hover { color: #1d4ed8 !important; }
html[data-theme="light"] .hover\:text-blue-400:hover { color: #1d4ed8 !important; }
html[data-theme="light"] .hover\:text-gray-100:hover { color: #111827 !important; }
html[data-theme="light"] .hover\:text-gray-200:hover { color: #1f2937 !important; }
html[data-theme="light"] .hover\:text-gray-300:hover { color: #334155 !important; }
html[data-theme="light"] .hover\:text-gray-400:hover { color: #475569 !important; }
html[data-theme="light"] .hover\:text-green-300:hover { color: #166534 !important; }
html[data-theme="light"] .hover\:text-green-400:hover { color: #15803d !important; }
html[data-theme="light"] .hover\:text-red-300:hover { color: #991b1b !important; }
html[data-theme="light"] .hover\:text-red-400:hover { color: #b91c1c !important; }
html[data-theme="light"] .hover\:text-yellow-300:hover { color: #854d0e !important; }
html[data-theme="light"] .hover\:text-yellow-400:hover { color: #a16207 !important; }
html[data-theme="light"] .placeholder-gray-400::placeholder { color: #64748b !important; }
html[data-theme="light"] .placeholder-gray-500::placeholder { color: #64748b !important; }
html[data-theme="light"] .placeholder-gray-600::placeholder { color: #64748b !important; }
html[data-theme="light"] .text-blue-200 { color: #1e40af !important; }
html[data-theme="light"] .text-blue-300 { color: #1d4ed8 !important; }
html[data-theme="light"] .text-blue-300\/80 { color: rgba(29, 78, 216, 0.8) !important; }
html[data-theme="light"] .text-blue-400 { color: #1d4ed8 !important; }
html[data-theme="light"] .text-blue-400\/80 { color: rgba(29, 78, 216, 0.8) !important; }
html[data-theme="light"] .text-gray-100 { color: #111827 !important; }
html[data-theme="light"] .text-gray-200 { color: #1f2937 !important; }
html[data-theme="light"] .text-gray-300 { color: #334155 !important; }
html[data-theme="light"] .text-gray-400 { color: #475569 !important; }
html[data-theme="light"] .text-gray-500 { color: #58677e !important; }
html[data-theme="light"] .text-gray-600 { color: #475569 !important; }
html[data-theme="light"] .text-green-300 { color: #166534 !important; }
html[data-theme="light"] .text-green-400 { color: #15803d !important; }
html[data-theme="light"] .text-red-300 { color: #991b1b !important; }
html[data-theme="light"] .text-red-400 { color: #b91c1c !important; }
html[data-theme="light"] .text-yellow-300 { color: #854d0e !important; }
html[data-theme="light"] .text-yellow-400 { color: #a16207 !important; }
html[data-theme="light"] .text-yellow-400\/80 { color: rgba(161, 98, 7, 0.8) !important; }

/* White utility text appears on dark cards as well as colored action buttons. */
html[data-theme="light"] .text-white { color: #111827 !important; }
html[data-theme="light"] :is([class~="bg-blue-400"], [class~="bg-blue-500"], [class~="bg-blue-600"], [class~="bg-blue-700"], [class~="bg-blue-800"], [class~="bg-red-500"], [class~="bg-red-600"], [class~="bg-red-700"], [class~="bg-green-500"], [class~="bg-green-600"], [class~="bg-green-700"], [class~="bg-purple-600"], [class~="bg-purple-700"], [class~="bg-indigo-600"], [class~="bg-indigo-700"]).text-white,
html[data-theme="light"] :is([class~="bg-blue-400"], [class~="bg-blue-500"], [class~="bg-blue-600"], [class~="bg-blue-700"], [class~="bg-blue-800"], [class~="bg-red-500"], [class~="bg-red-600"], [class~="bg-red-700"], [class~="bg-green-500"], [class~="bg-green-600"], [class~="bg-green-700"], [class~="bg-purple-600"], [class~="bg-purple-700"], [class~="bg-indigo-600"], [class~="bg-indigo-700"]) .text-white { color: #ffffff !important; }
html[data-theme="light"] body { background: #f8fafc; color: #1f2937; }
html[data-theme="dark"] body { background: #0b1220; color: #d2dbe8; }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea { color-scheme: light; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { color-scheme: dark; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #e9eef5; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #adbdcf; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
html[data-theme="light"] .tv-chart-maximized { background-color: #ffffff; }
html[data-theme="light"] .dashboard-tab.active,
html[data-theme="light"] .today-tab.active { background-color: #dbeafe; color: #1e40af; }
html[data-theme="light"] .tab-btn.is-active { color: #1d4ed8; border-color: #1d4ed8; }
html[data-theme="light"] .divider { color: #64748b; }
html[data-theme="light"] .divider::before,
html[data-theme="light"] .divider::after { background: #cbd5e1; }
html[data-theme="light"] #global-message-banner { color: #ffffff; }
html[data-theme="light"] #auth-screen input,
html[data-theme="light"] #forgot-password-modal input,
html[data-theme="light"] #reset-password-screen input { background: #ffffff; border-color: #cbd5e1; color: #111827; }


/* Light palette for custom components in style.css. These source rules use literal colors. */
html[data-theme="light"] .tv-chart-maximized { background-color: #f8fafc !important; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #ffffff !important; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #dce4ee !important; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #cbd5e1 !important; }
html[data-theme="light"] .dashboard-tab.active { background-color: #e9eef5 !important; color: #111827 !important; }
html[data-theme="light"] .today-tab.active { background-color: #e9eef5 !important; color: #111827 !important; }
html[data-theme="light"] .divider { color: #58677e !important; }
html[data-theme="light"] .divider::before,
html[data-theme="light"] .divider::after { background: #e9eef5 !important; }
html[data-theme="light"] #auth-screen input[type="email"],
html[data-theme="light"] #auth-screen input[type="password"],
html[data-theme="light"] #auth-screen input[type="text"],
html[data-theme="light"] #forgot-password-modal input[type="email"],
html[data-theme="light"] #reset-password-screen input[type="password"],
html[data-theme="light"] #reset-password-screen input[type="text"] { background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #1f2937 !important; }
html[data-theme="light"] #auth-screen input::placeholder,
html[data-theme="light"] #forgot-password-modal input::placeholder,
html[data-theme="light"] #reset-password-screen input::placeholder { color: #475569 !important; }
html[data-theme="light"] .tab-active { color: #111827 !important; }
html[data-theme="light"] .tab-inactive { color: #58677e !important; }
html[data-theme="light"] .auth-remember-label { color: #475569 !important; }
html[data-theme="light"] #onboarding-screen input[type="text"],
html[data-theme="light"] #onboarding-screen input[type="email"],
html[data-theme="light"] #onboarding-screen input[type="number"],
html[data-theme="light"] #onboarding-screen input[type="url"] { background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #1f2937 !important; }
html[data-theme="light"] #onboarding-screen input::placeholder { color: #475569 !important; }
html[data-theme="light"] .ob-username-checking { color: #475569 !important; }
html[data-theme="light"] .drop-area { border: 2px dashed #94a3b8 !important; background-color: #ffffff !important; }
html[data-theme="light"] .drop-area.drag-over { background-color: #e9eef5 !important; }
html[data-theme="light"] .daily-block .date { color: #334155 !important; }
@media screen and (max-width: 767px) { html[data-theme="light"] .responsive-table tr { border: 1px solid #94a3b8 !important; } }
@media screen and (max-width: 767px) { html[data-theme="light"] .responsive-table td:before { color: #334155 !important; } }
html[data-theme="light"] .cal-day-cell { background: #ffffff !important; }
html[data-theme="light"] .cal-day-num { color: #334155 !important; }
html[data-theme="light"] .cal-day-cell.cal-today .cal-day-num { color: #111827 !important; }
html[data-theme="light"] .cal-badge-journal { background: #dbeafe !important; }
html[data-theme="light"] .cal-badge-pnl-neg { color: #111827 !important; }
html[data-theme="light"] .cal-hover-card { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-summary-card { background: #ffffff !important; }
html[data-theme="light"] .cal-weekday-label { color: #58677e !important; }
html[data-theme="light"] .cal-month-nav-btn { background: #e9eef5 !important; border: 1px solid #94a3b8 !important; color: #334155 !important; }
html[data-theme="light"] .cal-month-nav-btn:hover { background: #dce4ee !important; color: #111827 !important; }
html[data-theme="light"] .cal-modal-box { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-modal-header { border-bottom: 1px solid #d5deea !important; background: #f8fafc !important; }
html[data-theme="light"] .cal-modal-close { color: #58677e !important; }
html[data-theme="light"] .cal-modal-close:hover { color: #111827 !important; background: #e9eef5 !important; }
html[data-theme="light"] .cal-modal-stat { border-bottom: 1px solid #d5deea !important; }
html[data-theme="light"] .cal-modal-stat-label { color: #475569 !important; }
html[data-theme="light"] .cal-modal-stat-value { color: #1f2937 !important; }
html[data-theme="light"] .cal-entry-card { background: #ffffff !important; border-left: 3px solid #94a3b8 !important; }
html[data-theme="light"] .cal-entry-card-title { color: #1f2937 !important; }
html[data-theme="light"] .cal-entry-card-note { color: #475569 !important; border-top: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-tag-pill { background: #e9eef5 !important; color: #334155 !important; }
@media (max-width: 767px) { html[data-theme="light"] .cal-day-cell.cal-tappable:active { background: #e9eef5 !important; } }
html[data-theme="light"] .cal-badge-daily-note { background: #ffffff !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-filter-chip { border: 1px solid #cbd5e1 !important; color: #58677e !important; }
html[data-theme="light"] .cal-filter-chip:hover { background: #e9eef5 !important; color: #334155 !important; }
html[data-theme="light"] .cal-filter-chip-active { background: #dbeafe !important; }
html[data-theme="light"] .cal-view-toggle-btn { color: #58677e !important; }
html[data-theme="light"] .cal-view-toggle-btn:hover { background: #e9eef5 !important; color: #334155 !important; }
html[data-theme="light"] .cal-view-toggle-active { background: #ffffff !important; color: #111827 !important; }
html[data-theme="light"] .cal-week-cell { background: #ffffff !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-week-cell-header { color: #475569 !important; }
html[data-theme="light"] .cal-week-cell-day { color: #111827 !important; }
html[data-theme="light"] .cal-week-cell-badge-journal { background: #dbeafe !important; }
html[data-theme="light"] .cal-heatmap-month-label { color: #58677e !important; }
html[data-theme="light"] .cal-year-legend { color: #58677e !important; }
html[data-theme="light"] .cal-compose-hint { color: #475569 !important; }
html[data-theme="light"] .cal-day-cell.cal-can-compose:hover { border-color: #94a3b8 !important; }
html[data-theme="light"] .cal-day-cell.cal-can-compose:hover .cal-compose-hint { color: #58677e !important; }
html[data-theme="light"] .cal-compose-modal-box { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-compose-header { border-bottom: 1px solid #d5deea !important; }
html[data-theme="light"] .cal-compose-textarea { background: #ffffff !important; color: #1f2937 !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-compose-textarea::placeholder { color: #475569 !important; }
html[data-theme="light"] .journal-mood-chip { border: 1px solid #94a3b8 !important; color: #334155 !important; }
html[data-theme="light"] .journal-mood-chip:hover { border-color: #94a3b8 !important; color: #1f2937 !important; }
html[data-theme="light"] .journal-entry-mood-badge { border: 1px solid #94a3b8 !important; color: #475569 !important; background: #e9eef5 !important; }
html[data-theme="light"] .journal-entry-time { color: #475569 !important; }
/* JournalDayDetail writes a pale text color inline; override it on white cards. */
html[data-theme="light"] .journal-entry-content { color: #334155 !important; }
html[data-theme="light"] .journal-entry-show-more { color: #1d4ed8 !important; }
html[data-theme="light"] .cal-compose-footer { border-top: 1px solid #d5deea !important; }
html[data-theme="light"] .cal-btn-cancel { background: #e9eef5 !important; color: #334155 !important; }
html[data-theme="light"] .cal-btn-cancel:hover { background: #dce4ee !important; }
html[data-theme="light"] .cal-btn-save { color: #111827 !important; }
html[data-theme="light"] .cal-notes-list-section { border-top: 1px solid #d5deea !important; }
html[data-theme="light"] .cal-notes-list-title { color: #334155 !important; }
html[data-theme="light"] .cal-notes-list-count { background: #ffffff !important; color: #58677e !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-notes-copy-all-btn { background: #ffffff !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .cal-notes-copy-all-btn:hover { background: #e9eef5 !important; color: #1f2937 !important; }
html[data-theme="light"] .cal-note-row { background: #ffffff !important; border-left: 3px solid #94a3b8 !important; }
html[data-theme="light"] .cal-note-row:hover { border-left-color: #94a3b8 !important; }
html[data-theme="light"] .cal-note-row-day { color: #1f2937 !important; }
html[data-theme="light"] .cal-note-row-weekday { color: #58677e !important; }
html[data-theme="light"] .cal-note-row-divider { background: #e9eef5 !important; }
html[data-theme="light"] .cal-note-mood-pill { background: #e9eef5 !important; color: #475569 !important; }
html[data-theme="light"] .cal-note-row-text { color: #475569 !important; }
html[data-theme="light"] .cal-note-action-btn { border: 1px solid #cbd5e1 !important; color: #58677e !important; }
html[data-theme="light"] .cal-note-action-btn:hover { background: #e9eef5 !important; color: #334155 !important; }
html[data-theme="light"] .cal-notes-empty-state { color: #475569 !important; }
html[data-theme="light"] .settings-sidebar-link.is-active { color: #111827 !important; }
html[data-theme="light"] .journal-entry-delete-btn:hover { background: #dce4ee !important; }
html[data-theme="light"] .journal-entry-delete-cancel-btn:hover { background: #dce4ee !important; }
html[data-theme="light"] .journal-undo-toast { background: #f8fafc !important; color: #1f2937 !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .journal-undo-toast-btn { border: 1px solid #94a3b8 !important; }
html[data-theme="light"] .journal-undo-toast-btn:hover { background: #ffffff !important; }
html[data-theme="light"] .journal-week-day { border: 1px solid #cbd5e1 !important; color: #334155 !important; }
html[data-theme="light"] .journal-week-day:hover { background: #ffffff !important; border-color: #94a3b8 !important; }
html[data-theme="light"] .journal-week-day[data-selected="true"] { color: #111827 !important; }
html[data-theme="light"] .journal-new-entry-btn { color: #111827 !important; }
html[data-theme="light"] .journal-future-hint { color: #475569 !important; }
html[data-theme="light"] .journal-empty-state { color: #475569 !important; }
html[data-theme="light"] .journal-date-picker { background: #ffffff !important; color: #334155 !important; border: 1px solid #cbd5e1 !important; }
html[data-theme="light"] .journal-date-picker:hover { border-color: #94a3b8 !important; }
html[data-theme="light"] .journal-keep-card { background: #ffffff !important; }
html[data-theme="light"] .today-ticker-section { background: #f8fafc !important; border-bottom: 1px solid #d5deea !important; }
html[data-theme="light"] .fp-summary { color: #475569 !important; }
html[data-theme="light"] .fp-table { border: 1px solid #d5deea !important; }
html[data-theme="light"] .fp-price { color: #334155 !important; }
html[data-theme="light"] .fp-vol,
html[data-theme="light"] .fp-tpo-count { color: #58677e !important; }
html[data-theme="light"] .fp-empty { color: #58677e !important; }
html[data-theme="light"] .ai-review-chart-label { color: #58677e !important; }

/* Filled controls retain white labels in the light palette. */
html[data-theme="light"] :is(.cal-badge-pnl-neg, .cal-btn-save, .journal-week-day[data-selected="true"], .journal-new-entry-btn, .settings-sidebar-link.is-active, .cal-day-cell.cal-today .cal-day-num) { color: #ffffff !important; }
html[data-theme="light"] .cal-day-cell.cal-weekend { background: #f1f5f9 !important; }
html[data-theme="light"] .auth-form-error-banner { background: #fef2f2 !important; border-color: #fecaca !important; color: #991b1b !important; }
html[data-theme="light"] .auth-field-error { color: #b91c1c !important; }

/* Market panels render their own bracketed Tailwind backgrounds. */
html[data-theme="light"] [class~="bg-[#161c29]"],
html[data-theme="light"] [class~="bg-[#101521]"],
html[data-theme="light"] [class~="bg-[#1b2231]"],
html[data-theme="light"] [class~="bg-[#0d1320]"] { background-color: #ffffff !important; }
html[data-theme="dark"] [class~="bg-[#161c29]"],
html[data-theme="dark"] [class~="bg-[#101521]"],
html[data-theme="dark"] [class~="bg-[#1b2231]"],
html[data-theme="dark"] [class~="bg-[#0d1320]"] { background-color: #101d31 !important; }
html[data-theme="light"] [class~="text-[#5b6678]"] { color: #475569 !important; }


/* Pastel status surfaces and legible status text on light cards. */
html[data-theme="light"] [class~="bg-amber-900/15"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-900/20"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-900/25"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-900/30"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-900/40"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-900/50"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-amber-950/20"] { background-color: #fef3c7 !important; }
html[data-theme="light"] [class~="bg-blue-900"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/10"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/20"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/25"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/30"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/40"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/50"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-900/60"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-950/20"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-950/30"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-blue-950/40"] { background-color: #eff6ff !important; }
html[data-theme="light"] [class~="bg-green-800/60"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-green-900"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-green-900/10"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-green-900/30"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-green-900/40"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-green-900/50"] { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="bg-indigo-900/40"] { background-color: #ede9fe !important; }
html[data-theme="light"] [class~="bg-purple-900/25"] { background-color: #ede9fe !important; }
html[data-theme="light"] [class~="bg-purple-900/40"] { background-color: #ede9fe !important; }
html[data-theme="light"] [class~="bg-red-900"] { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="bg-red-900/20"] { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="bg-red-900/30"] { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="bg-red-900/40"] { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="bg-red-900/50"] { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="bg-yellow-900"] { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="bg-yellow-900/20"] { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="bg-yellow-900/30"] { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="bg-yellow-900/40"] { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="bg-yellow-900/50"] { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="border-blue-900/30"] { border-color: #bfdbfe !important; }
html[data-theme="light"] [class~="hover:bg-green-900/10"]:hover { background-color: #dcfce7 !important; }
html[data-theme="light"] [class~="hover:bg-red-900/10"]:hover { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="hover:bg-red-900/40"]:hover { background-color: #fee2e2 !important; }
html[data-theme="light"] [class~="hover:bg-yellow-800/60"]:hover { background-color: #fef9c3 !important; }
html[data-theme="light"] [class~="hover:text-amber-300"]:hover { color: #92400e !important; }
html[data-theme="light"] [class~="hover:text-indigo-300"]:hover { color: #3730a3 !important; }
html[data-theme="light"] [class~="hover:text-indigo-400"]:hover { color: #3730a3 !important; }
html[data-theme="light"] [class~="text-amber-100/90"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-200"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-200/90"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-300"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-300/80"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-300/90"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-400"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-amber-400/90"] { color: #92400e !important; }
html[data-theme="light"] [class~="text-indigo-200"] { color: #3730a3 !important; }
html[data-theme="light"] [class~="text-indigo-300"] { color: #3730a3 !important; }
html[data-theme="light"] [class~="text-indigo-400"] { color: #3730a3 !important; }
html[data-theme="light"] [class~="text-purple-300"] { color: #6b21a8 !important; }
html[data-theme="light"] [class~="text-purple-400"] { color: #6b21a8 !important; }
