/* Modern dashboard canvas (light mode) */
body.bg-slate-100 {
    background-color: #edf3ff !important;
    background-image:
        radial-gradient(circle at 12% 14%, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0) 34%),
        radial-gradient(circle at 86% 84%, rgba(14, 165, 233, 0.14), rgba(14, 165, 233, 0) 38%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 255, 0.92)),
        repeating-linear-gradient(
            135deg,
            rgba(148, 163, 184, 0.08) 0,
            rgba(148, 163, 184, 0.08) 1px,
            transparent 1px,
            transparent 12px
        );
    background-attachment: fixed;
}

/* Smooth transition while toggling between modes */
body,
body .bg-white,
body .bg-slate-100,
body .border-slate-200,
body .border-slate-300 {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

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

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

/* Modern dashboard canvas (dark mode) */
body.theme-dark.bg-slate-100 {
    background-color: #020617 !important;
    background-image:
        radial-gradient(circle at 14% 16%, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0) 34%),
        radial-gradient(circle at 82% 84%, rgba(6, 182, 212, 0.14), rgba(6, 182, 212, 0) 36%),
        linear-gradient(145deg, #020617 0%, #0b1328 54%, #111a2e 100%),
        repeating-linear-gradient(
            135deg,
            rgba(100, 116, 139, 0.12) 0,
            rgba(100, 116, 139, 0.12) 1px,
            transparent 1px,
            transparent 14px
        );
    background-attachment: fixed;
}

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

body.theme-dark .border-slate-200,
body.theme-dark .border-slate-300 {
    border-color: #334155 !important;
}

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

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

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

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

/* Balance utility badges/active highlights in dark mode */
body.theme-dark .bg-blue-50 {
    background-color: #1e293b !important;
}

body.theme-dark .text-blue-700 {
    color: #93c5fd !important;
}

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

body.theme-dark .text-green-700 {
    color: #6ee7b7 !important;
}

body.theme-dark .border-green-200 {
    border-color: #0f766e !important;
}

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

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

body.theme-dark .border-red-200 {
    border-color: #b91c1c !important;
}

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

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

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

body.theme-dark .border-amber-200 {
    border-color: #b45309 !important;
}

body.theme-dark .hover\:bg-blue-50:hover {
    background-color: #1e3a8a !important;
}

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

/* Dashboard summary cards */
.summary-card {
    border-color: transparent !important;
    color: #0f172a;
}

.summary-card-sermons {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.summary-card-blogs {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.summary-card-events {
    background: linear-gradient(135deg, #f3e8ff 0%, #ddd6fe 100%);
}

body.theme-dark .summary-card {
    color: #e2e8f0;
    border-color: #334155 !important;
}

body.theme-dark .summary-card-sermons {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

body.theme-dark .summary-card-blogs {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

body.theme-dark .summary-card-events {
    background: linear-gradient(135deg, #5b21b6 0%, #6d28d9 100%);
}

/* Modern compact scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8, #64748b);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Dark mode scrollbar palette */
body.theme-dark * {
    scrollbar-color: #475569 transparent;
}

body.theme-dark *::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #334155, #475569);
    border: 2px solid transparent;
    background-clip: padding-box;
}

body.theme-dark *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569, #64748b);
    background-clip: padding-box;
}

@media (min-width: 1024px) {
    .admin-sidebar {
        overflow: hidden;
    }

    .admin-sidebar-link,
    .admin-sidebar-brand,
    #toggle-sidebar-collapse {
        transition: all 0.2s ease;
    }

    .admin-sidebar-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.sidebar-collapsed .admin-sidebar {
        width: 5.5rem !important;
    }

    body.sidebar-collapsed .admin-sidebar nav {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    body.sidebar-collapsed .admin-sidebar-brand {
        justify-content: center;
    }

    body.sidebar-collapsed .admin-sidebar-brand-text,
    body.sidebar-collapsed .admin-sidebar-label {
        display: none;
    }

    body.sidebar-collapsed .admin-sidebar-link {
        justify-content: center;
        gap: 0;
    }

    body.sidebar-collapsed #toggle-sidebar-collapse svg {
        transform: rotate(180deg);
    }
}
