/* ===================================================
   Operator Light Mode Theme Override
   Activated by: <html class="light">
   Sidebar (<aside>) is excluded — stays dark always.
   =================================================== */

/* --- Page background --- */
html.light {
    background-color: #f8f9fa !important;
}

/* --- Top bar --- */
html.light header.sticky {
    background-color: rgba(248, 249, 250, 0.95) !important;
    border-color: #e5e7eb !important;
}

/* --- Background overrides (NOT in sidebar) --- */
html.light *:not(aside):not(aside *).bg-gray-900 {
    background-color: #f8f9fa !important;
}
html.light *:not(aside):not(aside *).bg-gray-800 {
    background-color: #ffffff !important;
}
html.light *:not(aside):not(aside *).bg-gray-700 {
    background-color: #e9ecef !important;
}
html.light *:not(aside):not(aside *).bg-gray-600 {
    background-color: #dee2e6 !important;
}

/* Alpha variants */
html.light *:not(aside):not(aside *).bg-gray-900\/95 {
    background-color: rgba(248, 249, 250, 0.95) !important;
}
html.light *:not(aside):not(aside *).bg-gray-900\/80 {
    background-color: rgba(248, 249, 250, 0.8) !important;
}
html.light *:not(aside):not(aside *).bg-gray-900\/70 {
    background-color: rgba(248, 249, 250, 0.7) !important;
}
html.light *:not(aside):not(aside *).bg-gray-800\/50 {
    background-color: rgba(255, 255, 255, 0.5) !important;
}
html.light *:not(aside):not(aside *).bg-gray-800\/95 {
    background-color: rgba(255, 255, 255, 0.95) !important;
}
html.light *:not(aside):not(aside *).bg-gray-700\/50 {
    background-color: rgba(233, 236, 239, 0.5) !important;
}
html.light *:not(aside):not(aside *).bg-gray-700\/30 {
    background-color: rgba(233, 236, 239, 0.3) !important;
}

/* Hover backgrounds */
html.light *:not(aside):not(aside *).hover\:bg-gray-800:hover {
    background-color: #f3f4f6 !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-700:hover {
    background-color: #e5e7eb !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-700\/50:hover {
    background-color: rgba(229, 231, 235, 0.5) !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-700\/30:hover {
    background-color: rgba(229, 231, 235, 0.3) !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-900:hover {
    background-color: #f3f4f6 !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-800\/50:hover {
    background-color: rgba(243, 244, 246, 0.5) !important;
}

/* --- Text overrides (NOT in sidebar) --- */
html.light *:not(aside):not(aside *).text-white {
    color: #111827 !important;
}
html.light *:not(aside):not(aside *).text-gray-300 {
    color: #374151 !important;
}
html.light *:not(aside):not(aside *).text-gray-400 {
    color: #6b7280 !important;
}
html.light *:not(aside):not(aside *).text-gray-500 {
    color: #6b7280 !important;
}
html.light *:not(aside):not(aside *).text-gray-600 {
    color: #4b5563 !important;
}

/* Hover text */
html.light *:not(aside):not(aside *).hover\:text-white:hover {
    color: #111827 !important;
}
html.light *:not(aside):not(aside *).hover\:text-gray-300:hover {
    color: #374151 !important;
}
html.light *:not(aside):not(aside *).hover\:text-gray-200:hover {
    color: #374151 !important;
}

/* Placeholder text */
html.light *:not(aside):not(aside *).placeholder\:text-gray-500::placeholder {
    color: #9ca3af !important;
}

/* --- Border overrides (NOT in sidebar) --- */
html.light *:not(aside):not(aside *).border-gray-700 {
    border-color: #e5e7eb !important;
}
html.light *:not(aside):not(aside *).border-gray-800 {
    border-color: #f3f4f6 !important;
}
html.light *:not(aside):not(aside *).border-gray-600 {
    border-color: #d1d5db !important;
}
html.light *:not(aside):not(aside *).border-gray-700\/50 {
    border-color: rgba(229, 231, 235, 0.5) !important;
}

/* Hover borders */
html.light *:not(aside):not(aside *).hover\:border-gray-600:hover {
    border-color: #d1d5db !important;
}
html.light *:not(aside):not(aside *).hover\:border-gray-500:hover {
    border-color: #9ca3af !important;
}

/* --- Divide overrides --- */
html.light *:not(aside):not(aside *).divide-gray-700 > :not([hidden]) ~ :not([hidden]) {
    border-color: #e5e7eb !important;
}
html.light *:not(aside):not(aside *).divide-gray-700\/50 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(229, 231, 235, 0.5) !important;
}
html.light *:not(aside):not(aside *).divide-gray-700\/30 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(229, 231, 235, 0.3) !important;
}

/* --- Ring overrides (for badges) --- */
html.light *:not(aside):not(aside *).ring-gray-500\/20 {
    --tw-ring-color: rgba(156, 163, 175, 0.2) !important;
}
html.light *:not(aside):not(aside *).ring-gray-500\/30 {
    --tw-ring-color: rgba(156, 163, 175, 0.3) !important;
}

/* --- Focus ring offset (inputs on light bg) --- */
html.light *:not(aside):not(aside *).focus\:ring-offset-gray-900:focus {
    --tw-ring-offset-color: #f8f9fa !important;
}

/* --- Scrollbar (light mode — main content only) --- */
html.light {
    scrollbar-color: #d1d5db #f8f9fa !important;
}
html.light ::-webkit-scrollbar-track {
    background: #f8f9fa !important;
}
html.light ::-webkit-scrollbar-thumb {
    background: #d1d5db !important;
}
html.light ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af !important;
}
html.light ::-webkit-scrollbar-corner {
    background: #f8f9fa !important;
}

/* Keep sidebar scrollbar dark */
html.light aside ::-webkit-scrollbar-track {
    background: transparent !important;
}
html.light aside ::-webkit-scrollbar-thumb {
    background: #374151 !important;
}
html.light aside {
    scrollbar-color: #374151 transparent !important;
}

/* --- Colored text overrides (light-400 shades too faint on white) --- */
html.light *:not(aside):not(aside *).text-green-400 { color: #15803d !important; }
html.light *:not(aside):not(aside *).text-green-300 { color: #16a34a !important; }
html.light *:not(aside):not(aside *).text-red-400 { color: #dc2626 !important; }
html.light *:not(aside):not(aside *).text-red-300 { color: #ef4444 !important; }
html.light *:not(aside):not(aside *).text-red-500\/50 { color: rgba(220, 38, 38, 0.5) !important; }
html.light *:not(aside):not(aside *).text-amber-400 { color: #d97706 !important; }
html.light *:not(aside):not(aside *).text-yellow-400 { color: #ca8a04 !important; }
html.light *:not(aside):not(aside *).text-emerald-300 { color: #059669 !important; }
html.light *:not(aside):not(aside *).text-emerald-400 { color: #059669 !important; }
html.light *:not(aside):not(aside *).text-blue-400 { color: #2563eb !important; }
html.light *:not(aside):not(aside *).text-blue-300 { color: #3b82f6 !important; }
html.light *:not(aside):not(aside *).text-purple-400 { color: #7c3aed !important; }
html.light *:not(aside):not(aside *).text-cyan-400 { color: #0891b2 !important; }
html.light *:not(aside):not(aside *).text-orange-400 { color: #ea580c !important; }
html.light *:not(aside):not(aside *).text-orange-300 { color: #f97316 !important; }
html.light *:not(aside):not(aside *).text-indigo-400 { color: #4f46e5 !important; }
html.light *:not(aside):not(aside *).text-pink-400 { color: #db2777 !important; }
html.light *:not(aside):not(aside *).text-lime-400 { color: #65a30d !important; }
html.light *:not(aside):not(aside *).text-teal-400 { color: #0d9488 !important; }

/* Hover colored text */
html.light *:not(aside):not(aside *).hover\:text-blue-300:hover { color: #3b82f6 !important; }
html.light *:not(aside):not(aside *).hover\:text-green-300:hover { color: #16a34a !important; }

/* --- Additional background overrides --- */
html.light *:not(aside):not(aside *).bg-gray-950 {
    background-color: #f1f3f5 !important;
}
html.light *:not(aside):not(aside *).bg-gray-900\/50 {
    background-color: rgba(241, 243, 245, 0.8) !important;
}
html.light *:not(aside):not(aside *).hover\:bg-gray-900\/50:hover {
    background-color: rgba(241, 243, 245, 0.9) !important;
}

/* Border overrides for colored borders */
html.light *:not(aside):not(aside *).border-gray-800 {
    border-color: #e5e7eb !important;
}
html.light *:not(aside):not(aside *).border-gray-800\/30 {
    border-color: rgba(229, 231, 235, 0.3) !important;
}
html.light *:not(aside):not(aside *).border-emerald-500\/20 {
    border-color: rgba(16, 185, 129, 0.3) !important;
}
html.light *:not(aside):not(aside *).border-blue-500\/20 {
    border-color: rgba(59, 130, 246, 0.3) !important;
}
html.light *:not(aside):not(aside *).border-red-500\/30 {
    border-color: rgba(239, 68, 68, 0.3) !important;
}
html.light *:not(aside):not(aside *).border-green-500\/30 {
    border-color: rgba(34, 197, 94, 0.3) !important;
}

/* Shadow adjustments (softer on light bg) --- */
html.light *:not(aside):not(aside *).hover\:shadow-lg:hover {
    --tw-shadow-color: rgba(0, 0, 0, 0.1) !important;
}
html.light *:not(aside):not(aside *).hover\:shadow-black\/20:hover {
    --tw-shadow-color: rgba(0, 0, 0, 0.05) !important;
}
