html.theme-dark,
body.theme-dark {
    color-scheme: dark;
    background: #020617 !important;
}

body.theme-dark {
    color: #e2e8f0;
}

body.theme-dark .bg-white,
body.theme-dark .bg-slate-50 {
    background-color: #0f172a !important;
}

body.theme-dark .bg-slate-100,
body.theme-dark .bg-slate-200 {
    background-color: #1e293b !important;
}

body.theme-dark .bg-blue-50 {
    background-color: #082f49 !important;
}

body.theme-dark .bg-green-50,
body.theme-dark .bg-emerald-50 {
    background-color: #052e2b !important;
}

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

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

body.theme-dark .bg-slate-800,
body.theme-dark .hero-bg {
    background: linear-gradient(135deg, #020617 0%, #0f172a 52%, #082f49 100%) !important;
}

body.theme-dark .text-slate-900,
body.theme-dark .text-slate-800,
body.theme-dark .text-slate-700 {
    color: #f8fafc !important;
}

body.theme-dark .text-slate-600,
body.theme-dark .text-slate-500 {
    color: #cbd5e1 !important;
}

body.theme-dark .text-slate-400 {
    color: #94a3b8 !important;
}

body.theme-dark .text-blue-600,
body.theme-dark .text-blue-700 {
    color: #60a5fa !important;
}

body.theme-dark .text-green-600,
body.theme-dark .text-green-700 {
    color: #34d399 !important;
}

body.theme-dark .text-red-500,
body.theme-dark .text-red-600,
body.theme-dark .text-red-700 {
    color: #fca5a5 !important;
}

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

body.theme-dark .border,
body.theme-dark .border-t,
body.theme-dark .border-b,
body.theme-dark .border-slate-100,
body.theme-dark .border-slate-200,
body.theme-dark .border-slate-300 {
    border-color: #1e293b !important;
}

body.theme-dark .border-blue-100,
body.theme-dark .border-blue-200 {
    border-color: #1d4ed8 !important;
}

body.theme-dark .border-green-100,
body.theme-dark .border-emerald-200 {
    border-color: #047857 !important;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background-color: #020617 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

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

body.theme-dark .shadow-sm,
body.theme-dark .shadow-xl,
body.theme-dark .shadow-2xl,
body.theme-dark .navbar-shadow {
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32) !important;
}

body.theme-dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%) !important;
    background-size: 200% 100% !important;
}

body.theme-dark img {
    filter: saturate(0.95);
}

.theme-toggle {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1e293b;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: #eff6ff;
}

.theme-toggle__icon {
    font-size: 16px;
    line-height: 1;
}

body.theme-dark .theme-toggle {
    background: rgba(15, 23, 42, 0.92);
    border-color: #1d4ed8;
    color: #dbeafe;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
}

body.theme-dark .theme-toggle:hover {
    background: #172554;
}

body.theme-dark aside.bg-slate-950 {
    background: #020617 !important;
}

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

body.theme-dark thead.bg-slate-50,
body.theme-dark table thead {
    background-color: #111827 !important;
}

body.theme-dark tbody.divide-y > :not([hidden]) ~ :not([hidden]) {
    border-color: #1e293b !important;
}

body.theme-dark tr:hover {
    background-color: rgba(30, 41, 59, 0.45);
}

body.theme-dark .rounded-lg.bg-white,
body.theme-dark .rounded-2xl.bg-white,
body.theme-dark .rounded-3xl.bg-white {
    background-color: #0f172a !important;
}

body.theme-dark .bg-slate-900 {
    background-color: #1d4ed8 !important;
}

body.theme-dark .text-white {
    color: #f8fafc !important;
}

body.theme-dark .admin-bg {
    background: radial-gradient(circle at top left, #0f172a 0, #020617 34%, #082f49 100%) !important;
}

@media (max-width: 640px) {
    .theme-toggle {
        left: 12px;
        bottom: 12px;
        min-height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }
}
