/*
 * TEMA GELAP MarkazHub (1 Okt 2026).
 *
 * Filament sudah menggelapkan komponennya sendiri. Yang tidak ikut adalah warna yang
 * DITULIS LANGSUNG di halaman kustom (style="background:#fff", teks #0f172a, kotak
 * peringatan #fef2f2, dst. - ±1.000 tempat). Daripada menyunting tiap halaman, warna
 * terang yang sering dipakai dipetakan ke padanan gelapnya di sini. Semua aturan hanya
 * berlaku di bawah .dark, jadi tema terang tak tersentuh sama sekali.
 */

.dark {
    --mkz-g-latar: #0b1220;
    --mkz-g-kartu: #111a2e;
    --mkz-g-kartu2: #17223a;
    --mkz-g-garis: #273349;
    --mkz-g-teks: #e5e7eb;
    --mkz-g-teks2: #cbd5e1;
    --mkz-g-redup: #94a3b8;
}

/* ---------- Latar terang yang ditulis langsung ---------- */
.dark :is([style*="background:#fff;"], [style*="background: #fff;"], [style*="background:#fff\""], [style*="background:#ffffff"], [style*="background: #ffffff"], [style*="background:white"], [style*="background: white"], [style*="background-color:#fff"], [style*="background-color: #fff"], [style*="background:#fff "]) {
    background: var(--mkz-g-kartu) !important;
}
.dark [style$="background:#fff"], .dark [style$="background: #fff"] {
    background: var(--mkz-g-kartu) !important;
}
.dark :is([style*="background:#f8fafc"], [style*="background: #f8fafc"], [style*="background:#f1f5f9"], [style*="background: #f1f5f9"], [style*="background:#f9fafb"], [style*="background:#f3f4f6"], [style*="background:#e2e8f0"], [style*="background: #e2e8f0"], [style*="background:#fbfcfd"], [style*="background:var(--gray-50)"], [style*="background:var(--gray-100)"]) {
    background: var(--mkz-g-kartu2) !important;
}
/* Kotak berwarna lembut (info / sukses / peringatan / bahaya): diganti versi gelap transparan. */
.dark :is([style*="background:#eff6ff"], [style*="background: #eff6ff"], [style*="background:#dbeafe"], [style*="background: #dbeafe"]) { background: rgba(37, 99, 235, .16) !important; }
.dark :is([style*="background:#f0fdf4"], [style*="background: #f0fdf4"], [style*="background:#d1fae5"], [style*="background: #d1fae5"], [style*="background:#dcfce7"], [style*="background:#ecfdf5"], [style*="background:#f0fdfa"]) { background: rgba(16, 185, 129, .16) !important; }
.dark :is([style*="background:#fffbeb"], [style*="background: #fffbeb"], [style*="background:#fef3c7"], [style*="background: #fef3c7"], [style*="background:#fff7ed"], [style*="background:#ffedd5"]) { background: rgba(245, 158, 11, .16) !important; }
.dark :is([style*="background:#fef2f2"], [style*="background: #fef2f2"], [style*="background:#fee2e2"], [style*="background: #fee2e2"]) { background: rgba(239, 68, 68, .16) !important; }

/* ---------- Teks gelap yang ditulis langsung ---------- */
.dark :is([style*="color:#0f172a"], [style*="color: #0f172a"], [style*="color:#111827"], [style*="color:#1e293b"], [style*="color: #1e293b"], [style*="color:#1b1b18"], [style*="color:#000;"], [style*="color:#111;"], [style*="color:#222"]) { color: var(--mkz-g-teks) !important; }
.dark :is([style*="color:#334155"], [style*="color: #334155"], [style*="color:#374151"], [style*="color:#475569"], [style*="color: #475569"], [style*="color:#4b5563"]) { color: var(--mkz-g-teks2) !important; }
.dark :is([style*="color:#64748b"], [style*="color: #64748b"], [style*="color:#6b7280"]) { color: var(--mkz-g-redup) !important; }
/* Warna status yang terlalu tua di latar gelap dinaikkan terangnya. */
.dark :is([style*="color:#b91c1c"], [style*="color: #b91c1c"], [style*="color:#991b1b"], [style*="color:#7f1d1d"], [style*="color: #7f1d1d"], [style*="color:#dc2626"], [style*="color: #dc2626"]) { color: #f87171 !important; }
.dark :is([style*="color:#047857"], [style*="color: #047857"], [style*="color:#15803d"], [style*="color: #15803d"], [style*="color:#166534"], [style*="color:#059669"], [style*="color:#16a34a"]) { color: #34d399 !important; }
.dark :is([style*="color:#b45309"], [style*="color: #b45309"], [style*="color:#92400e"], [style*="color:#78350f"], [style*="color:#c2410c"], [style*="color:#9a3412"], [style*="color:#d97706"]) { color: #fbbf24 !important; }
.dark :is([style*="color:#1d4ed8"], [style*="color: #1d4ed8"], [style*="color:#1e40af"], [style*="color:#1e3a8a"], [style*="color: #1e3a8a"], [style*="color:#2563eb"], [style*="color: #2563eb"]) { color: #60a5fa !important; }

/* ---------- Garis tepi terang ---------- */
.dark :is([style*="border:1px solid #e"], [style*="border: 1px solid #e"], [style*="border-top:1px solid #e"], [style*="border-bottom:1px solid #e"], [style*="border-color:#e"], [style*="border:1px solid #cbd5e1"], [style*="border:1px solid #d"]) {
    border-color: var(--mkz-g-garis) !important;
}

/* ---------- Tabel & elemen polos di halaman kustom ---------- */
.dark .fi-main :is(table th, table td) { border-color: var(--mkz-g-garis); }
.dark .fi-main :is(input, textarea, select):not([class*="fi-"]) {
    background: var(--mkz-g-kartu2);
    color: var(--mkz-g-teks);
    border-color: var(--mkz-g-garis);
}
.dark .fi-main ::placeholder { color: var(--mkz-g-redup); }

/* Gambar produk berlatar putih tetap putih (bukan dibalik): bingkai saja yang menggelap. */
.dark img { color-scheme: light; }

/* Bilah tombol yang menempel di bawah formulir (Edit Listing): gradasi putih -> gelap. */
.dark [style*="linear-gradient(to top, rgba(255,255,255"] {
    background: linear-gradient(to top, rgba(11, 18, 32, .95), rgba(11, 18, 32, 0)) !important;
}
