html {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background-color: #111827 !important;
    color: #e5e7eb;
}

html[data-theme="dark"] .bg-gradient-to-br {
    background-image: none !important;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-white\/90,
html[data-theme="dark"] .bg-white\/95 {
    background-color: #1f2937 !important;
}

html[data-theme="dark"] .bg-gray-50,
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .bg-zinc-100,
html[data-theme="dark"] .bg-orange-50 {
    background-color: #111827 !important;
}

html[data-theme="dark"] .bg-amber-50,
html[data-theme="dark"] .bg-amber-100,
html[data-theme="dark"] .bg-yellow-50,
html[data-theme="dark"] .bg-yellow-100 {
    background-color: #3a2a12 !important;
}

html[data-theme="dark"] .bg-green-50,
html[data-theme="dark"] .bg-green-100 {
    background-color: #123524 !important;
}

html[data-theme="dark"] .bg-blue-50,
html[data-theme="dark"] .bg-blue-100 {
    background-color: #172b46 !important;
}

html[data-theme="dark"] .bg-red-50,
html[data-theme="dark"] .bg-red-100 {
    background-color: #451a1a !important;
}

html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700 {
    color: #f3f4f6 !important;
}

html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500,
html[data-theme="dark"] .text-gray-400 {
    color: #9ca3af !important;
}

html[data-theme="dark"] .text-gray-300 {
    color: #6b7280 !important;
}

html[data-theme="dark"] .border-gray-50,
html[data-theme="dark"] .border-gray-100,
html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300 {
    border-color: #374151 !important;
}

html[data-theme="dark"] .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #374151 !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #4b5563 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #9ca3af !important;
}

html[data-theme="dark"] .shadow,
html[data-theme="dark"] .shadow-md,
html[data-theme="dark"] .shadow-lg,
html[data-theme="dark"] .shadow-xl,
html[data-theme="dark"] .shadow-2xl {
    --tw-shadow-color: rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] footer {
    background-color: #0b1220 !important;
}

html[data-theme="dark"] hr {
    border-color: #374151 !important;
}

html[data-theme="dark"] .hover\:bg-gray-50:hover,
html[data-theme="dark"] .hover\:bg-gray-100:hover,
html[data-theme="dark"] .hover\:bg-gray-200:hover {
    background-color: #374151 !important;
}

html[data-theme="dark"] .select2-container--default .select2-results__option,
html[data-theme="dark"] .select2-container--default .select2-search--dropdown {
    background-color: #1f2937;
    color: #f3f4f6;
}

html[data-theme="dark"] .select2-dropdown {
    background-color: #1f2937;
    border-color: #4b5563;
}

.theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.75rem;
    color: #b45309;
    background: transparent;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover {
    background-color: rgba(245, 158, 11, 0.12);
}

html[data-theme="dark"] .theme-toggle {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
    body,
    nav,
    footer,
    .theme-toggle {
        transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
    }
}
