/* ============================================
   Dark Mode – Apartman Yönetim Sistemi
   Active when: <html class="dark">
   Storage: localStorage('darkMode')
   ============================================ */

html.dark {
    color-scheme: dark;
}

/* ─── Mobil Performans Optimizasyonları ─── */
@media (hover: none),
(pointer: coarse) {
    html.dark body {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    html.dark .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html.dark #sidebar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html.dark .backdrop-blur-sm,
    html.dark .backdrop-blur-md,
    html.dark [class*="backdrop-blur"] {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Mobilde box-shadow glow efektlerini kaldır */
    html.dark .bg-blue-600,
    html.dark .bg-emerald-500\/60 {
        box-shadow: none !important;
    }

    /* Mobilde transition-all yerine sadece gerekli property'ler */
    html.dark *,
    html.dark *::before,
    html.dark *::after {
        transition-property: opacity, visibility !important;
        transition-duration: 0.15s !important;
    }

    html.dark #sidebar {
        transition-property: transform !important;
        transition-duration: 0.3s !important;
    }

    html.dark #sidebar-overlay {
        transition-property: opacity !important;
        transition-duration: 0.3s !important;
    }
}

/* ─── Body ─── */
html.dark body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    color: #cbd5e1 !important;
}

/* ─── Glass Panel ─── */
html.dark .glass-panel {
    background: rgba(30, 41, 59, 0.98) !important;
    background-image: none !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Apartman No:6 paneli – koyu mavi gradient */
html.dark .glass-panel[class*="from-sky"],
html.dark .glass-panel[class*="to-blue"] {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(30, 41, 59, 0.88) 50%, rgba(125, 211, 252, 0.2) 100%) !important;
    background-image: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(30, 41, 59, 0.88) 50%, rgba(125, 211, 252, 0.2) 100%) !important;
    border: 1px solid rgba(125, 211, 252, 0.28) !important;
}

/* Apartman No:8 paneli – koyu yeşil gradient */
html.dark .glass-panel[class*="from-amber"],
html.dark .glass-panel[class*="to-yellow"] {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.2) 0%, rgba(2, 44, 34, 0.95) 50%, rgba(5, 150, 105, 0.15) 100%) !important;
    background-image: linear-gradient(135deg, rgba(4, 120, 87, 0.2) 0%, rgba(2, 44, 34, 0.95) 50%, rgba(5, 150, 105, 0.15) 100%) !important;
    border: 1px solid rgba(4, 120, 87, 0.3) !important;
}

/* daire_detay.php – Body arka planları (koyu temada renkli gradient) */
html.dark body[class*="from-sky"] {
    background: linear-gradient(135deg, #122f4d 0%, #111827 50%, #1a3555 100%) !important;
}

html.dark body[class*="from-amber"] {
    background: linear-gradient(135deg, #022c22 0%, #01140f 50%, #064e3b 100%) !important;
}

/* Hızlı İşlemler paneli – koyu yeşil gradient */
html.dark .glass-panel[class*="bg-emerald"] {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(16, 185, 129, 0.12) 100%) !important;
    background-image: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(16, 185, 129, 0.12) 100%) !important;
    border: 1px solid rgba(52, 211, 153, 0.2) !important;
}

/* Finans Durumu - Gelirler Paneli (Koyu Yeşil Gradient) */
html.dark .glass-panel[class*="from-emerald"] {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.6) 0%, rgba(2, 44, 34, 0.98) 50%, rgba(4, 120, 87, 0.5) 100%) !important;
    background-image: linear-gradient(135deg, rgba(6, 78, 59, 0.6) 0%, rgba(2, 44, 34, 0.98) 50%, rgba(4, 120, 87, 0.5) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

/* İç elemanların yeşil şeffaflığı */
html.dark .glass-panel[class*="from-emerald"] [class*="bg-white"],
html.dark .glass-panel[class*="from-emerald"] [class*="bg-gray-50"],
html.dark .glass-panel[class*="from-emerald"] thead {
    background-color: rgba(16, 185, 129, 0.05) !important;
    border-color: rgba(16, 185, 129, 0.15) !important;
}

html.dark .glass-panel[class*="from-emerald"] tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

/* Finans Durumu - Giderler Paneli (Koyu Kırmızı/Gül Gradient) */
html.dark .glass-panel[class*="from-rose"] {
    background: linear-gradient(135deg, rgba(136, 19, 55, 0.6) 0%, rgba(76, 5, 25, 0.98) 50%, rgba(159, 18, 57, 0.5) 100%) !important;
    background-image: linear-gradient(135deg, rgba(136, 19, 55, 0.6) 0%, rgba(76, 5, 25, 0.98) 50%, rgba(159, 18, 57, 0.5) 100%) !important;
    border: 1px solid rgba(225, 29, 72, 0.4) !important;
}

/* İç elemanların kırmızı şeffaflığı */
html.dark .glass-panel[class*="from-rose"] [class*="bg-white"],
html.dark .glass-panel[class*="from-rose"] [class*="bg-gray-50"],
html.dark .glass-panel[class*="from-rose"] thead {
    background-color: rgba(225, 29, 72, 0.05) !important;
    border-color: rgba(225, 29, 72, 0.15) !important;
}

html.dark .glass-panel[class*="from-rose"] tbody tr:hover {
    background-color: rgba(225, 29, 72, 0.15) !important;
}

/* ─── Buton Renklendirmeleri ─── */
html.dark button[onclick="openAddTenantModal()"],
html.dark button[onclick*="openPaymentPlanModal('create')"],
html.dark button[onclick*="openPaymentPlanModal('edit')"] {
    background-color: #2563eb !important;
    /* blue-600 */
}

html.dark button[onclick="openAddTenantModal()"]:hover,
html.dark button[onclick*="openPaymentPlanModal('create')"]:hover,
html.dark button[onclick*="openPaymentPlanModal('edit')"]:hover {
    background-color: #1d4ed8 !important;
    /* blue-700 */
}

/* Finans Tablosu (Ödeme Planı & Ödemeler) İşlem Butonları Hover */
html.dark #finance-table-container button[title="Düzenle"]:hover {
    background-color: #f8fafc !important;
    /* light slate/white */
    color: #0f172a !important;
    /* dark slate/black (ikon için) */
}

html.dark #finance-table-container button[title="Tahsilatı Sil"]:hover {
    background-color: #dc2626 !important;
    /* red-600 */
    color: #ffffff !important;
}

/* Ana Sayfaya Dön / Geri Butonu Hover */
html.dark a[href="index.php"]:not(.group):hover {
    background-color: #10b981 !important;
    /* emerald-500 */
    color: #ffffff !important;
    /* beyaz ikon ve metin */
    border-color: #059669 !important;
    /* emerald-600 */
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3) !important;
}

/* ─── Headings ─── */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4 {
    color: #f1f5f9 !important;
}

/* ─── Labels & Paragraphs ─── */
html.dark label {
    color: #cbd5e1 !important;
}

html.dark p {
    color: #94a3b8;
}

/* ─── Gray text utilities ─── */
html.dark .text-gray-900,
html.dark .text-slate-900 {
    color: #f1f5f9 !important;
}

html.dark .text-gray-800,
html.dark .text-slate-800 {
    color: #e2e8f0 !important;
}

html.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

html.dark .text-gray-600 {
    color: #94a3b8 !important;
}

html.dark .text-gray-500 {
    color: #7c8ca2 !important;
}

html.dark .text-gray-400 {
    color: #64748b !important;
}

html.dark .text-gray-950 {
    color: #e2e8f0 !important;
}

/* ─── Headers & nav bars ─── */
html.dark header {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* ─── Inputs ─── */
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
html.dark textarea,
html.dark select {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(71, 85, 105, 0.5) !important;
    color: #e2e8f0 !important;
}

/* Select kutusu açıldığında çıkan seçenek listesi (dropdown option) arka planı */
html.dark select option,
html.dark select optgroup {
    background-color: #1e293b !important;
    /* slate-800 */
    color: #e2e8f0 !important;
}

/* Şeffaf olarak tasarlanmış readonly textboxların kutu gibi görünmesini engelle (Yüksek CSS Specificity) */
html.dark #tenant-modal-panel input.bg-transparent,
html.dark #tenant-modal-panel textarea.bg-transparent,
html.dark #tenant-modal-panel select.bg-transparent {
    background-color: transparent !important;
    color: #e2e8f0 !important;
}

html.dark #tenant-modal-panel input.border-transparent,
html.dark #tenant-modal-panel textarea.border-transparent,
html.dark #tenant-modal-panel select.border-transparent {
    border-color: transparent !important;
}

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

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3) !important;
}

/* Anasayfa Hızlı Tahsilat / Arama Sonuçları (Dropdown) */
html.dark #quick-search-results {
    background-color: #1e293b !important;
    /* slate-800 */
    border-color: rgba(51, 65, 85, 0.4) !important;
}

html.dark #quick-search-results div.hover\:bg-emerald-50:hover {
    background-color: rgba(16, 185, 129, 0.2) !important;
    /* koyu yeşil hover */
}

/* Arama sonuçlarındaki metinlerin okunabilirliği */
html.dark #quick-search-results .text-gray-800 {
    color: #e2e8f0 !important;
}

html.dark #quick-search-results .text-gray-500 {
    color: #94a3b8 !important;
}

html.dark #quick-search-results .border-b {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* ─── Tables ─── */
/* Ödeme planı tablosunda tahsilatı yapılan satırlar (koyu yeşil arka plan ve açık yeşil yazılar) */
html.dark tr.bg-emerald-50\/80 {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

html.dark tr.bg-emerald-50\/80 td.text-emerald-800,
html.dark tr.bg-emerald-50\/80 td.text-emerald-900,
html.dark tr.bg-emerald-50\/80 td.text-emerald-600 {
    color: #34d399 !important;
    /* emerald-400 */
}

html.dark tr.bg-emerald-50\/80 td.border-emerald-100 {
    border-color: rgba(52, 211, 153, 0.2) !important;
}

/* Ödendi / Ödenmedi etiketleri (span) */
html.dark .bg-emerald-100.text-emerald-800 {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    /* emerald-400 */
    border-color: rgba(52, 211, 153, 0.3) !important;
}

html.dark .bg-red-100.text-red-800 {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    /* red-400 */
    border-color: rgba(248, 113, 113, 0.3) !important;
}

html.dark thead {
    background: rgba(30, 41, 59, 0.7) !important;
}

/* Kiracı Listesi İsim & Soyisim */
html.dark tr[id^="tenant-row-"] td .text-gray-900 {
    color: #ffffff !important;
}

html.dark thead th {
    color: #94a3b8 !important;
    background: transparent !important;
}

html.dark tbody {
    background: transparent !important;
}

html.dark tbody td {
    color: #cbd5e1 !important;
}

html.dark tbody tr {
    border-color: rgba(51, 65, 85, 0.3) !important;
}

html.dark tbody tr:hover {
    background: rgba(51, 65, 85, 0.3) !important;
}

html.dark .divide-gray-200>*+*,
html.dark .divide-gray-100>*+* {
    border-color: rgba(51, 65, 85, 0.3) !important;
}

html.dark table {
    border-color: rgba(51, 65, 85, 0.3) !important;
}

/* ─── Background utilities ─── */
html.dark .bg-white {
    background-color: rgb(30, 41, 59) !important;
}

html.dark [class*="bg-gray-50"] {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

html.dark [class*="bg-gray-100"] {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

html.dark [class*="bg-gray-200"] {
    background-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark [class*="bg-gray-300"] {
    background-color: rgba(71, 85, 105, 0.6) !important;
}

/* Toggles (Toggle Slider) Override: Eğer slider ON durumundaysa (checked) kendi rengini (yeşil) korusun */
html.dark input.peer:checked~div[class*="peer-checked:bg-emerald-500"],
html.dark input.peer:checked~div.peer-checked\:bg-emerald-500,
html.dark input.peer:checked~div.peer-checked\:bg-slate-700 {
    background-color: #10b981 !important;
    /* emerald-500 */
}

/* Koyu modda sayfa hızlandırması (hardware acceleration) bug'ı çözümü (Özellikle çıkış yap/hoşgeldin arkasındaki beyaz parlama hatası) */
html.dark .z-20.bg-gray-200\/50.backdrop-blur-md {
    background-color: #1e293b !important;
    /* Tam opak (solid) yaparak blur hatasını gizler */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Çıkış yap butonu hover (gri) */
html.dark a[href="logout.php"]:hover,
html.dark .hover\:bg-gray-400:hover,
html.dark .hover\:bg-gray-500:hover {
    background-color: #4b5563 !important;
    /* gray-600 tonunda belirgin gri */
}

/* ─── Border utilities ─── */
html.dark [class*="border-gray-100"],
html.dark [class*="border-gray-200"],
html.dark [class*="border-gray-300"] {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

html.dark .border-b,
html.dark .border-t,
html.dark .border-r,
html.dark .border-l {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* index.php'deki üst bilgi/çıkış paneli gri çizgileri gizleme / daha koyu yapma */
html.dark .border-gray-300\/30,
html.dark .border-gray-400\/30,
html.dark .divide-gray-300\/30> :not([hidden])~ :not([hidden]) {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* ─── White-ish backgrounds (cards, links, buttons) ─── */
html.dark [class*="bg-white\/"] {
    background: rgba(30, 41, 59, 0.6) !important;
}

html.dark .hover\:bg-white:hover {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

/* index.php içindeki daire kartlarında sol ikon ve sağ ok (chevron) kapsayıcısına hover durumu (koyu gri) */
html.dark .group\/row:hover .group-hover\/row\:bg-gray-300,
html.dark .group:hover .group-hover\:bg-gray-300 {
    background-color: #1e293b !important;
    /* slate-800 koyu gri */
    color: #f8fafc !important;
    /* ikon rengi beyaz/açık gri */
}

/* ─── Sidebar (index.php) ─── */
html.dark #sidebar {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
    border-color: rgba(51, 65, 85, 0.4) !important;
}

html.dark #sidebar>div[class*="bg-gradient-to-br"] {
    background: transparent !important;
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* ─── Soft colored background badges ─── */
html.dark .bg-indigo-50,
html.dark .bg-indigo-100 {
    background-color: rgba(49, 46, 129, 0.25) !important;
}

html.dark .bg-blue-100 {
    background-color: rgba(30, 58, 138, 0.25) !important;
}

html.dark .bg-purple-100 {
    background-color: rgba(88, 28, 135, 0.25) !important;
}

html.dark .bg-green-100 {
    background-color: rgba(6, 78, 59, 0.25) !important;
}

html.dark .bg-red-50,
html.dark .bg-red-100 {
    background-color: rgba(127, 29, 29, 0.2) !important;
}

html.dark .bg-rose-50,
html.dark [class*="bg-rose-100"] {
    background-color: rgba(225, 29, 72, 0.25) !important;
    /* rose-600 tabağında açık kırmızı */
    border-color: rgba(225, 29, 72, 0.4) !important;
}

html.dark a[title="Daireyi Boşalt"],
html.dark .text-rose-600 {
    color: #fb7185 !important;
    /* rose-400 parlak kırmızı/pembe */
}

html.dark .bg-amber-50,
html.dark .bg-amber-100 {
    background-color: rgba(120, 53, 15, 0.2) !important;
}

html.dark .bg-emerald-50,
html.dark .bg-emerald-100 {
    background-color: rgba(6, 78, 59, 0.2) !important;
}

/* ─── Modals ─── */
html.dark [id*="-panel"][class*="bg-white"] {
    background: rgba(30, 41, 59, 0.98) !important;
}

html.dark [id*="-panel"] .border-b,
html.dark [id*="-panel"] .border-t {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* Bilgileri Düzenle Modalı - Çöp Kutusu (Demirbaşlar) */
html.dark #edit-apartment-modal-panel button[title="Sil"] {
    color: #94a3b8 !important;
    /* slate-400 (gri) */
    background-color: transparent !important;
}

html.dark #edit-apartment-modal-panel button[title="Sil"]:hover {
    background-color: #ef4444 !important;
    /* red-500 (kırmızı arkaplan) */
    color: #ffffff !important;
    /* ikon rengi beyaz */
    border-radius: 6px;
}

/* ─── Gradient sections (finans etc.) ─── */
html.dark section.glass-panel {
    background: rgba(30, 41, 59, 0.92) !important;
    background-image: none !important;
}

/* Anasayfa ve Detay Sayfası Apartman Grupları (Apt 6 ve Apt 8) Koyu Mod Gradientleri */

/* Apt 6 - Koyu Mavi Gradient (Panel ve Sayfa Arka Planı) */
html.dark .glass-panel[class*="from-sky"],
html.dark body[class*="from-sky"] {
    background: linear-gradient(to bottom right, rgba(15, 23, 42, 1), rgba(30, 58, 138, 0.35)) !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
}

/* Apt 8 - Koyu Sarı/Amber Gradient (Panel ve Sayfa Arka Planı) */
html.dark .glass-panel[class*="from-amber"],
html.dark body[class*="from-amber"] {
    background: linear-gradient(to bottom right, rgba(15, 23, 42, 1), rgba(120, 53, 15, 0.3)) !important;
    border-color: rgba(251, 191, 36, 0.2) !important;
}

/* Apartman No: 6 başlığının yanındaki dikey çubuk (Logo) rengi */
html.dark .bg-blue-600 {
    background-color: #1d4ed8 !important;
    /* ağır ve net koyu mavi / blue-700 */
}

/* Apartman No: 8 başlığının yanındaki dikey çubuk (Logo) rengi */
html.dark .bg-emerald-500\/60 {
    background-color: #059669 !important;
    /* koyu yeşil / emerald-600 */
}

/* Glow efektleri sadece masaüstünde (hover destekli cihazlarda) */
@media (hover: hover) and (pointer: fine) {
    html.dark .bg-blue-600 {
        box-shadow: 0 0 15px rgba(29, 78, 216, 0.6) !important;
    }

    html.dark .bg-emerald-500\/60 {
        box-shadow: 0 0 12px rgba(5, 150, 105, 0.6) !important;
    }
}

/* ─── Alerts (Başarı Uyarıları / Popup) ─── */
html.dark #success-alert>div,
html.dark #success-alert.bg-emerald-100,
html.dark .bg-emerald-50.border-emerald-200,
html.dark .bg-emerald-100.border-emerald-400 {
    background-color: #064e3b !important;
    /* emerald-900 (koyu opak yeşil arka plan) */
    border-color: rgba(16, 185, 129, 0.5) !important;
}

/* Başarı (Success) Alert İçin Yazı/İkon Renkleri */
html.dark #success-alert,
html.dark #success-alert div,
html.dark #success-alert span,
html.dark #success-alert svg,
html.dark #success-alert button {
    color: #34d399 !important;
    /* emerald-400 */
}

/* İkon arka planı (uyarı kutusu içindeki küçük ikon bölmesi) */
html.dark #success-alert .bg-emerald-100 {
    background-color: rgba(16, 185, 129, 0.2) !important;
}

/* ─── Top bar area (index.php) ─── */
html.dark [class*="bg-gray-200\/50"] {
    background-color: rgba(51, 65, 85, 0.5) !important;
}

/* ─── Card hover areas ─── */
html.dark .card-hover {
    background: rgba(30, 41, 59, 0.6) !important;
}

/* ─── Scrollbar ─── */
html.dark ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* ─── daire_detay.php – Paneller ve iç elemanlar ─── */

/* Gradient panelleri (Daire Bilgileri, Kiracı Listesi vb.) */
html.dark section.glass-panel[class*="bg-gradient"] {
    background: rgba(30, 41, 59, 0.92) !important;
    background-image: none !important;
}

/* Panel içi kart arka planları (bg-gray-100/50, bg-gray-200/50, bg-gray-50/50 vb.) */
html.dark [class*="bg-gray-100\/"],
html.dark [class*="bg-gray-200\/"],
html.dark [class*="bg-gray-50\/"] {
    background: rgba(51, 65, 85, 0.3) !important;
}

/* İkon kutuları */
html.dark div[class*="bg-gray-200\/50"][class*="rounded-lg"] {
    background: rgba(51, 65, 85, 0.5) !important;
    color: #94a3b8 !important;
}

/* Geri dön butonu ve info badge'leri */
html.dark a[class*="bg-gray-100\/"] {
    background: rgba(51, 65, 85, 0.5) !important;
}

/* Tablo tbody bg-gray-50/50 arka planları */
html.dark tbody[class*="bg-gray-50"] {
    background: rgba(30, 41, 59, 0.3) !important;
}

/* Satır hover renkleri – emerald/yeşil hover korunsun ama koyu tonda */
html.dark tr[class*="hover:bg-emerald"]:hover {
    background: rgba(6, 78, 59, 0.2) !important;
}

/* Kiracı tablosundaki ad link rengi */
html.dark .group-hover\:text-emerald-700 {
    color: #34d399 !important;
}

/* Border renkleri – slash'li sınıflar için */
html.dark [class*="border-gray-200\/"],
html.dark [class*="border-gray-100\/"],
html.dark [class*="border-gray-300\/"],
html.dark [class*="border-white\/"] {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* Readonly inputlar (daire düzenleme modalı vs.) */
html.dark input[readonly],
html.dark textarea[readonly] {
    background: rgba(30, 41, 59, 0.4) !important;
    color: #94a3b8 !important;
}

/* Dashed border'lar (boş liste mesajları) */
html.dark [class*="border-dashed"] {
    border-color: rgba(71, 85, 105, 0.5) !important;
}

/* Modal header gradient'leri */
html.dark [class*="from-gray-700"][class*="to-gray-800"],
html.dark [class*="from-slate-700"][class*="to-slate-800"],
html.dark [class*="from-slate-800"][class*="to-slate-900"] {
    background: linear-gradient(to right, #1e293b, #0f172a) !important;
}

/* Ödeme planı ve finans panelleri */
html.dark [class*="bg-sky-50"],
html.dark [class*="bg-sky-100"] {
    background-color: rgba(14, 116, 144, 0.15) !important;
}

html.dark [class*="text-sky-800"],
html.dark [class*="text-sky-700"] {
    color: #7dd3fc !important;
}

html.dark [class*="text-sky-600"] {
    color: #38bdf8 !important;
}

/* Emerald text */
html.dark [class*="text-emerald-700"],
html.dark [class*="text-emerald-800"] {
    color: #6ee7b7 !important;
}

html.dark [class*="text-emerald-600"] {
    color: #34d399 !important;
}

/* Rose text */
html.dark [class*="text-rose-600"],
html.dark [class*="text-rose-700"] {
    color: #fb7185 !important;
}

/* Amber text */
html.dark [class*="text-amber-700"],
html.dark [class*="text-amber-800"] {
    color: #fbbf24 !important;
}

/* ─── Loglar Sayfası (`loglar.php`) Özel Koyu Tema Kuralları ─── */

/* Arama Kutusu */
html.dark input#logSearchInput {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: #f8fafc !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

html.dark input#logSearchInput::placeholder {
    color: #94a3b8 !important;
}

html.dark #clearSearchBtn {
    color: #94a3b8 !important;
}

/* Tablo Hover */
html.dark #logsTableBody tr.hover\:bg-gray-50\/50:hover {
    background-color: rgba(51, 65, 85, 0.4) !important;
}

/* Tablo İçindeki Kullanıcı ve İşlem Etiketleri */
html.dark td .bg-indigo-50.text-indigo-600 {
    background-color: rgba(99, 102, 241, 0.15) !important;
    color: #818cf8 !important;
    /* indigo-400 */
}

html.dark td .bg-blue-100.text-blue-800 {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    /* blue-400 */
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Sayfalama (Pagination) Butonları */
html.dark #paginationButtons a.bg-white {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: #cbd5e1 !important;
    border-color: rgba(51, 65, 85, 0.8) !important;
}

html.dark #paginationButtons a.bg-white:hover {
    background-color: rgba(51, 65, 85, 0.6) !important;
}

html.dark #paginationButtons a.bg-indigo-600 {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
}

/* Tüm Logları Sil Butonu */
html.dark button.bg-rose-50.text-rose-600 {
    background-color: rgba(225, 29, 72, 0.15) !important;
    color: #fb7185 !important;
    /* rose-400 */
    border-color: rgba(225, 29, 72, 0.3) !important;
}

html.dark button.bg-rose-50.text-rose-600:hover {
    background-color: rgba(225, 29, 72, 0.25) !important;
}

/* Ana Sayfa Başlık Yazısı (19 Mayıs...) Gri Yap - En Alt Öncelik */
html.dark body h1.inline-flex.text-gray-900,
html.dark body header h1 {
    color: #94a3b8 !important;
    /* slate-400 gri */
}

/* ─── Yedekleme Sayfası Modal Koyu Mod ─── */

/* Otomatik Yedekleme Ayarları Modalı – Panel arka planı */
html.dark #auto-backup-settings-panel {
    background: rgba(30, 41, 59, 0.98) !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
}

/* Sunucuya Otomatik Yedekleme bölümü (bg-teal-50) */
html.dark #auto-backup-settings-panel .bg-teal-50 {
    background-color: rgba(13, 148, 136, 0.12) !important;
    border-color: rgba(13, 148, 136, 0.3) !important;
}

html.dark #auto-backup-settings-panel .text-teal-800 {
    color: #5eead4 !important;
    /* teal-300 */
}

html.dark #auto-backup-settings-panel .text-teal-600 {
    color: #2dd4bf !important;
    /* teal-400 */
}

/* Mail ile Otomatik Yedekleme bölümü (bg-indigo-50) */
html.dark #auto-backup-settings-panel .bg-indigo-50 {
    background-color: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

html.dark #auto-backup-settings-panel .text-indigo-800 {
    color: #a5b4fc !important;
    /* indigo-300 */
}

html.dark #auto-backup-settings-panel .text-indigo-600 {
    color: #818cf8 !important;
    /* indigo-400 */
}

/* Toggle label ve form metin renkleri */
html.dark #auto-backup-settings-panel .text-gray-700 {
    color: #cbd5e1 !important;
}

html.dark #auto-backup-settings-panel .text-gray-600 {
    color: #94a3b8 !important;
}

/* İptal butonu */
html.dark #auto-backup-settings-panel .bg-gray-100 {
    background-color: rgba(51, 65, 85, 0.5) !important;
    color: #94a3b8 !important;
}

html.dark #auto-backup-settings-panel .bg-gray-100:hover {
    background-color: rgba(51, 65, 85, 0.8) !important;
    color: #e2e8f0 !important;
}

/* Border ayırıcı */
html.dark #auto-backup-settings-panel .border-gray-100 {
    border-color: rgba(51, 65, 85, 0.4) !important;
}

/* Mail Ayarları Modalı – Panel arka planı */
html.dark #mail-settings-panel {
    background: rgba(30, 41, 59, 0.98) !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
}

/* Tahsilat Ayarları Modalı – Panel arka planı */
html.dark #tahsilat-settings-panel {
    background: rgba(30, 41, 59, 0.98) !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
}

/* Tahsilat – amber bölüm */
html.dark #tahsilat-settings-panel .bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

html.dark #tahsilat-settings-panel .text-amber-800 {
    color: #fbbf24 !important;
}

/* Sonuç Modalı – Panel arka planı */
html.dark #result-panel {
    background: rgba(30, 41, 59, 0.98) !important;
    border: 1px solid rgba(51, 65, 85, 0.4) !important;
}