/* Light theme — always bright when dark class is absent */
html:not(.dark) {
    color-scheme: light;
}

html:not(.dark) body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

html:not(.dark) .bg-white,
html:not(.dark) .nc-card,
html:not(.dark) .nc-cat-tab,
html:not(.dark) .nc-cat-subcard {
    background-color: #ffffff !important;
}

html:not(.dark) .bg-slate-50 {
    background-color: #f8fafc !important;
}

html:not(.dark) .bg-gray-50 {
    background-color: #f9fafb !important;
}

html:not(.dark) .text-gray-900 {
    color: #111827 !important;
}

html:not(.dark) .text-gray-700,
html:not(.dark) .text-gray-600 {
    color: #374151 !important;
}

html:not(.dark) .text-gray-500 {
    color: #6b7280 !important;
}

html:not(.dark) header,
html:not(.dark) footer {
    background-color: transparent !important;
}

html:not(.dark) .nc-cat-sticky-bar {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.97) 85%, rgba(248, 250, 252, 0)) !important;
}

html:not(.dark) .nc-nav-link:not(.is-active):hover {
    background-color: rgba(243, 244, 246, 0.95) !important;
    color: #111827 !important;
}

/* Header icon buttons — soft indigo hover (avoids dark gray-on-gray in dark mode) */
.nc-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.375rem;
    color: #4b5563;
    transition: color 0.15s ease, background-color 0.15s ease;
}

@media (min-width: 640px) {
    .nc-header-icon {
        padding: 0.5rem;
    }
}

.nc-header-icon:hover {
    background-color: rgba(238, 242, 255, 0.95) !important;
    color: #4f46e5 !important;
}

.dark .nc-header-icon {
    color: #cbd5e1 !important;
}

.dark .nc-header-icon:hover {
    background-color: rgba(99, 102, 241, 0.22) !important;
    color: #c7d2fe !important;
}

.nc-theme-toggle-btn {
    min-width: 2rem;
    min-height: 2rem;
}

@media (min-width: 640px) {
    .nc-theme-toggle-btn {
        min-width: 2.5rem;
        min-height: 2.5rem;
    }
}

.nc-theme-toggle-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
}

@media (min-width: 640px) {
    .nc-theme-toggle-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.nc-theme-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.nc-theme-icon-sun {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.nc-theme-icon-moon {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dark .nc-theme-icon-sun {
    opacity: 0;
    transform: scale(0.92);
}

.dark .nc-theme-icon-moon {
    opacity: 1;
    transform: scale(1);
}

html:not(.dark) .nc-theme-toggle-btn {
    color: #374151 !important;
}

html:not(.dark) .nc-theme-toggle-btn:hover {
    color: #4f46e5 !important;
}

.nc-theme-menu-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #374151;
    text-align: left;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nc-theme-menu-item:hover {
    background-color: #f9fafb;
}

.nc-theme-menu-item.is-active {
    color: #4f46e5;
    font-weight: 500;
}

.dark .nc-theme-menu-item {
    color: #e2e8f0;
}

.dark .nc-theme-menu-item:hover {
    background-color: #1e293b;
}

.dark .nc-theme-menu-item.is-active {
    color: #a5b4fc;
}

.nc-location-btn:hover {
    background-color: rgba(238, 242, 255, 0.95) !important;
}

.dark .nc-location-btn:hover {
    background-color: rgba(99, 102, 241, 0.15) !important;
}

.nc-mobile-menu-link {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #374151;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nc-mobile-menu-link:hover {
    background-color: rgba(238, 242, 255, 0.95) !important;
    color: #4f46e5 !important;
}

.dark .nc-mobile-menu-link {
    color: #e2e8f0 !important;
}

.dark .nc-mobile-menu-link:hover {
    background-color: rgba(99, 102, 241, 0.18) !important;
    color: #c7d2fe !important;
}

/* Dark theme compatibility for Tailwind utility pages */
.dark {
    color-scheme: dark;
}

.dark body {
    background-color: #020617 !important;
    color: #f1f5f9 !important;
}

.dark .bg-white {
    background-color: #0f172a !important;
}

.dark .bg-slate-50 {
    background-color: #020617 !important;
}

.dark .bg-gray-50 {
    background-color: #1e293b !important;
}

.dark .bg-gray-100 {
    background-color: #334155 !important;
}

.dark .bg-gray-200 {
    background-color: #475569 !important;
}

.dark .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark .text-gray-800 {
    color: #e2e8f0 !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-600 {
    color: #94a3b8 !important;
}

.dark .text-gray-500 {
    color: #94a3b8 !important;
}

.dark .text-gray-400 {
    color: #64748b !important;
}

.dark .text-gray-300 {
    color: #64748b !important;
}

.dark .border-gray-100 {
    border-color: #1e293b !important;
}

.dark .border-gray-200 {
    border-color: #334155 !important;
}

.dark .border-gray-300 {
    border-color: #475569 !important;
}

.dark .hover\:bg-gray-100:hover {
    background-color: #1e293b !important;
}

.dark .hover\:bg-gray-50:hover {
    background-color: #1e293b !important;
}

.dark .hover\:text-gray-900:hover {
    color: #f1f5f9 !important;
}

.dark .bg-indigo-50 {
    background-color: #1e1b4b !important;
}

.dark .hover\:bg-indigo-50:hover {
    background-color: #312e81 !important;
}

.dark .bg-indigo-100 {
    background-color: #312e81 !important;
}

.dark .text-indigo-800 {
    color: #c7d2fe !important;
}

.dark .hover\:bg-indigo-100:hover {
    background-color: #3730a3 !important;
}

.dark .hover\:bg-indigo-200:hover {
    background-color: #4338ca !important;
}

.dark .bg-green-50 {
    background-color: #052e16 !important;
}

.dark .bg-red-50 {
    background-color: #450a0a !important;
}

.dark .bg-blue-50 {
    background-color: #172554 !important;
}

.dark .bg-amber-50 {
    background-color: #451a03 !important;
}

.dark .bg-amber-100 {
    background-color: #78350f !important;
}

.dark .border-green-200 {
    border-color: #166534 !important;
}

.dark .border-red-200 {
    border-color: #991b1b !important;
}

.dark .border-blue-200 {
    border-color: #1e40af !important;
}

.dark .border-amber-100,
.dark .border-amber-200 {
    border-color: #92400e !important;
}

.dark .text-green-800 {
    color: #bbf7d0 !important;
}

.dark .text-red-800 {
    color: #fecaca !important;
}

.dark .text-blue-800 {
    color: #bfdbfe !important;
}

.dark .text-amber-700,
.dark .text-amber-800 {
    color: #fcd34d !important;
}

.dark .text-green-700 {
    color: #86efac !important;
}

.dark .text-red-700 {
    color: #fca5a5 !important;
}

.dark .hover\:bg-green-100:hover {
    background-color: #14532d !important;
}

.dark .hover\:bg-green-200:hover {
    background-color: #166534 !important;
}

.dark .hover\:bg-red-100:hover {
    background-color: #7f1d1d !important;
}

.dark .hover\:bg-red-200:hover {
    background-color: #991b1b !important;
}

.dark .nc-card {
    background: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.dark .nc-card:hover {
    border-color: #4338ca !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dark .nc-page-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
}

.dark .nc-menu-row:hover {
    background: rgba(30, 41, 59, 0.65);
}

.dark .nc-icon-box {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.dark .nc-nav-link:not(.is-active):hover {
    background-color: rgba(30, 41, 59, 0.88) !important;
    color: #f8fafc !important;
}

.dark .nc-cat-sticky-bar {
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.97) 85%, rgba(2, 6, 23, 0)) !important;
}

.dark .nc-cat-tab {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.dark .nc-cat-tab:hover {
    border-color: #6366f1 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2) !important;
}

.dark .nc-cat-tab.is-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.dark .nc-cat-tab-icon {
    background: linear-gradient(135deg, #312e81, #1e1b4b) !important;
    color: #c7d2fe !important;
}

.dark .nc-cat-tab.is-active .nc-cat-tab-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.dark .nc-cat-subcard {
    background: #1e293b !important;
    border-color: #475569 !important;
}

.dark .nc-cat-subcard:hover {
    border-color: #6366f1 !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15) !important;
}

.dark .nc-cat-subcard-icon {
    background: linear-gradient(135deg, #312e81, #1e1b4b) !important;
    color: #c7d2fe !important;
}

.dark input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.dark select,
.dark textarea {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}

.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

.dark .shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
}

.dark .shadow-md {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
}

.dark .shadow-lg {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5) !important;
}

.dark .seller-tab {
    color: #94a3b8;
}

.dark .seller-tab:hover {
    color: #e2e8f0;
}

.dark .seller-tab.is-active {
    color: #a5b4fc;
    border-bottom-color: transparent;
}

.dark .seller-gmaps-action {
    color: #a5b4fc;
}

.dark .seller-gmaps-action-icon {
    background: #1e1b4b;
}

.dark .seller-gmaps-action:hover .seller-gmaps-action-icon {
    background: #312e81;
}

.dark .seller-overview-icon {
    background: #334155;
    color: #cbd5e1;
}
