/* ============================================================
   DevGive Clone — Dark Mode CSS (COMPLETE OVERRIDE)
   This file covers EVERY element in the site with !important.
   Loaded in ALL pages: home, admin, dashboard, blog, auth.
   Triggered by: <html class="dark">
   ============================================================ */

/* === BASE === */
html.dark {
    color-scheme: dark;
}
html.dark body,
html.dark .bg-slate-50,
html.dark .bg-slate-100,
html.dark .bg-slate-200 {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

/* === WHITE BACKGROUNDS → DARK === */
html.dark .bg-white,
html.dark .bg-white\/70,
html.dark .bg-white\/75,
html.dark .bg-white\/80,
html.dark .bg-white\/60,
html.dark .bg-white\/90 {
    background-color: #1e293b !important;
}

/* === TEXT COLORS === */
html.dark .text-slate-800,
html.dark .text-slate-900,
html.dark .text-slate-950 {
    color: #e2e8f0 !important;
}
html.dark .text-slate-700 {
    color: #cbd5e1 !important;
}
html.dark .text-slate-600 {
    color: #94a3b8 !important;
}
html.dark .text-slate-500,
html.dark .text-slate-400 {
    color: #64748b !important;
}
html.dark .text-slate-300 {
    color: #475569 !important;
}
html.dark .text-black {
    color: #e2e8f0 !important;
}

/* === BORDERS === */
html.dark .border-slate-200,
html.dark .border-slate-100,
html.dark .border-slate-300 {
    border-color: #334155 !important;
}
html.dark .border-slate-50 {
    border-color: #1e293b !important;
}
html.dark .divide-slate-100 > *,
html.dark .divide-slate-200 > * {
    border-color: #334155 !important;
}

/* === HOVER BACKGROUNDS === */
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-slate-100:hover,
html.dark .hover\:bg-slate-200:hover {
    background-color: #334155 !important;
}

/* === FORM ELEMENTS === */
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="url"],
html.dark input[type="file"],
html.dark input[type="search"],
html.dark textarea,
html.dark select {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #64748b !important;
}

/* === COLORED BACKGROUNDS (light variants) === */
html.dark .bg-emerald-50 { background-color: rgba(6, 95, 70, 0.2) !important; }
html.dark .bg-red-50 { background-color: rgba(153, 27, 27, 0.2) !important; }
html.dark .bg-amber-50 { background-color: rgba(146, 64, 14, 0.2) !important; }
html.dark .bg-yellow-50 { background-color: rgba(146, 64, 14, 0.2) !important; }
html.dark .bg-blue-50 { background-color: rgba(30, 64, 175, 0.2) !important; }
html.dark .bg-purple-50 { background-color: rgba(88, 28, 135, 0.2) !important; }
html.dark .bg-cyan-50 { background-color: rgba(8, 145, 178, 0.2) !important; }
html.dark .bg-indigo-50 { background-color: rgba(49, 46, 129, 0.2) !important; }
html.dark .bg-green-50 { background-color: rgba(6, 95, 70, 0.2) !important; }
html.dark .bg-orange-50 { background-color: rgba(154, 52, 18, 0.2) !important; }
html.dark .bg-pink-50 { background-color: rgba(131, 24, 67, 0.2) !important; }

/* === ALERTS === */
html.dark .alert-success {
    background: rgba(6, 95, 70, 0.3) !important;
    border-color: #6ee7b7 !important;
    color: #6ee7b7 !important;
}
html.dark .alert-error {
    background: rgba(153, 27, 27, 0.3) !important;
    border-color: #fca5a5 !important;
    color: #fca5a5 !important;
}
html.dark .alert-warning {
    background: rgba(146, 64, 14, 0.3) !important;
    border-color: #fcd34d !important;
    color: #fcd34d !important;
}
html.dark .alert-info {
    background: rgba(30, 64, 175, 0.3) !important;
    border-color: #93c5fd !important;
    color: #93c5fd !important;
}

/* === BADGES === */
html.dark .badge-pending {
    background: rgba(146, 64, 14, 0.3) !important;
    color: #fcd34d !important;
}
html.dark .badge-approved {
    background: rgba(6, 95, 70, 0.3) !important;
    color: #6ee7b7 !important;
}
html.dark .badge-rejected {
    background: rgba(153, 27, 27, 0.3) !important;
    color: #fca5a5 !important;
}

/* === ADMIN SIDEBAR === */
html.dark .admin-sidebar-link {
    color: #94a3b8 !important;
}
html.dark .admin-sidebar-link:hover {
    background: #334155 !important;
    color: #e2e8f0 !important;
}
html.dark .admin-sidebar-link.active {
    background: rgba(14, 165, 233, 0.15) !important;
    color: #38bdf8 !important;
}

/* === HERO GRADIENT === */
html.dark .hero-gradient {
    background:
        radial-gradient(1200px 600px at 100% 0%, rgba(14, 165, 233, 0.15), transparent 60%),
        radial-gradient(800px 400px at 0% 100%, rgba(37, 99, 235, 0.15), transparent 60%) !important;
}

/* === STAT TILE === */
html.dark .stat-tile {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(37, 99, 235, 0.1)) !important;
    border-color: #334155 !important;
}

/* === ICON CIRCLE === */
html.dark .icon-circle {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(37, 99, 235, 0.15)) !important;
    color: #38bdf8 !important;
}

/* === GRID CARD === */
html.dark .grid-card::before {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
}

/* === CTA OUTLINE === */
html.dark .cta-outline {
    border-color: #475569 !important;
    background: rgba(30, 41, 59, 0.6) !important;
    color: #e2e8f0 !important;
}

/* === PILL === */
html.dark .pill {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(37, 99, 235, 0.15)) !important;
    color: #38bdf8 !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

/* === PROSE (rich text content) === */
html.dark .prose {
    color: #cbd5e1 !important;
}
html.dark .prose h1,
html.dark .prose h2,
html.dark .prose h3,
html.dark .prose h4 {
    color: #f1f5f9 !important;
}
html.dark .prose a {
    color: #38bdf8 !important;
}
html.dark .prose blockquote {
    border-left-color: #475569 !important;
    color: #94a3b8 !important;
}
html.dark .prose code {
    background: #334155 !important;
    color: #f87171 !important;
}
html.dark .prose pre {
    background: #0f172a !important;
    border-color: #334155 !important;
}
html.dark .prose img {
    opacity: 0.9;
}

/* === TABLE === */
html.dark table thead {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
}

/* === LINKS === */
html.dark a {
    color: inherit;
}
html.dark a:hover {
    color: #38bdf8 !important;
}

/* === SCROLLBAR === */
html.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
html.dark ::-webkit-scrollbar-track {
    background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* === CARD GLOW === */
html.dark .card-glow:hover {
    box-shadow: 0 12px 30px -10px rgba(14, 165, 233, 0.3) !important;
}

/* === SHAPE DIVIDERS / MISC === */
html.dark .bg-gradient-to-r,
html.dark .bg-gradient-to-br {
    opacity: 0.9;
}

/* === CKEditor dark mode === */
html.dark .ck-editor__main {
    background: #1e293b !important;
}
html.dark .ck-editor__main .ck-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
html.dark .ck-toolbar {
    background: #334155 !important;
    border-color: #475569 !important;
}
html.dark .ck-toolbar .ck-button {
    color: #cbd5e1 !important;
}
html.dark .ck-toolbar .ck-button:hover {
    background: #475569 !important;
}
