/* ==========================================================================
   SmartPayCheck Full Dark Mode Engine (Complete Replacement)
   ========================================================================== */

html.dark {
  color-scheme: dark;
}

/* 1. Gövde & Genel Zemin */
html.dark body {
  background-color: #0b1120 !important;
  color: #cbd5e1 !important;
}

/* 2. Kartlar, Konteynerler, Menüler & Tablolar */
html.dark header,
html.dark footer,
html.dark main,
html.dark article,
html.dark section,
html.dark table,
html.dark thead,
html.dark tbody,
html.dark tr,
html.dark .bg-white,
html.dark .bg-slate-50,
html.dark .bg-slate-50\/50,
html.dark .bg-slate-100 {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

/* 3. Başlıklar & Metinler */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark strong,
html.dark b,
html.dark .text-slate-900,
html.dark .text-slate-800 {
  color: #f8fafc !important;
}

html.dark p,
html.dark li,
html.dark .text-slate-700,
html.dark .text-slate-600,
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

/* 4. Form Elemanları */
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

/* 5. Bölücüler ve Kenarlıklar */
html.dark .border,
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-300,
html.dark .divide-slate-100,
html.dark .divide-slate-200 {
  border-color: #1f2937 !important;
}

/* 6. TABLO İÇİ ROZETLER ("Progressive", Oranlar, Kutucuklar) */
html.dark table td span,
html.dark table td div,
html.dark table td .inline-flex,
html.dark table td [class*="bg-"] {
  background-color: #1e293b !important;
  color: #38bdf8 !important; /* Açık mavi okunur metin */
  border: 1px solid #334155 !important;
}

/* 0% No State Tax Yeşil Rozetinin Koruması */
html.dark table td .bg-emerald-50,
html.dark table td .bg-emerald-100,
html.dark table td [class*="text-emerald-"] {
  background-color: rgba(6, 78, 59, 0.5) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

/* 7. TABLO BUTONLARI ("View Page") */
html.dark table a,
html.dark table td a,
html.dark table td button,
html.dark table a span {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

html.dark table a:hover,
html.dark table td a:hover {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* 8. ÜST FİLTRE BUTONLARI (All Regions, US States, Canada vb.) */
html.dark .filter-btn,
html.dark button[data-filter],
html.dark .flex-wrap button:not(.theme-toggle-btn) {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

/* Aktif / Seçili Filtre Butonu */
html.dark .filter-btn.active,
html.dark .flex-wrap button.bg-brand-600,
html.dark .flex-wrap button[class*="bg-brand-"],
html.dark .flex-wrap button.text-white {
  background-color: #059669 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

/* 9. SONUÇ KARTI (Tailwind Gradient Ezme) */
html.dark [class*="from-brand-50"],
html.dark [class*="to-emerald-100"],
html.dark .bg-gradient-to-br {
  --tw-gradient-from: transparent !important;
  --tw-gradient-to: transparent !important;
  --tw-gradient-stops: transparent, transparent !important;
  background-image: none !important;
  background-color: #064e3b !important;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.25) !important;
}

html.dark [class*="from-brand-50"] p,
html.dark [class*="to-emerald-100"] p,
html.dark .bg-gradient-to-br p {
  color: #34d399 !important;
}

html.dark [class*="from-brand-50"] #netPayDisplay,
html.dark [class*="to-emerald-100"] #netPayDisplay,
html.dark .bg-gradient-to-br #netPayDisplay,
html.dark .bg-gradient-to-br .font-black {
  color: #ffffff !important;
}

html.dark [class*="from-brand-50"] #perPeriodLabel,
html.dark [class*="to-emerald-100"] #perPeriodLabel,
html.dark .bg-gradient-to-br #perPeriodLabel {
  color: #94a3b8 !important;
}

/* 10. Mobil Menü ve Harita SVG Ayarları */
html.dark #mobileMenu {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
}

html.dark #usMapContainer {
  background-color: #111827 !important;
  border-color: #1f2937 !important;
}

html.dark .state-path {
  stroke: #111827 !important;
}