/* Dark Mode CSS Variables */
:root {
  /* Light Mode (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #adb5bd;
  --border-color: #dee2e6;
  --card-bg: #ffffff;
  --card-border: #e9ecef;
  --input-bg: #ffffff;
  --input-border: #ced4da;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
  --navbar-bg: #ffffff;
  --navbar-text: #212529;
  --footer-bg: #ffffff;
  --footer-text: #6c757d;
}

/* TEMA ANAHTARI (Global - tüm sayfalar için) */
.theme-switch { display: inline-flex; align-items: center; gap: 10px; }
.theme-switch .theme-icon { font-size: 20px; color: var(--text-primary, #111); }
.theme-switch-control { position: relative; width: 62px; height: 30px; background: #f0f0f0; border: 2px solid #d0d0d0; border-radius: 999px; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.theme-switch-control input { opacity: 0; width: 0; height: 0; }
.theme-switch-slider { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; background: #ffffff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: transform 0.2s ease, background-color 0.2s ease; }
.theme-switch-control input:checked + .theme-switch-slider { transform: translateX(30px); background: #ffd369; box-shadow: 0 3px 8px rgba(0,0,0,0.35); }
/* Dark mode tema anahtarı renkleri */
[data-theme="dark"] .theme-switch-control { background: #2b2b2b; border-color: #555; }
[data-theme="dark"] .theme-switch-slider { background: #e9e9e9; }
[data-theme="dark"] .theme-switch-control input:checked + .theme-switch-slider { background: #ffe08a; }

[data-theme="dark"] {
  /* Dark Mode */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #3a3a3a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #404040;
  --card-bg: #2d2d2d;
  --card-border: #404040;
  --input-bg: #2d2d2d;
  --input-border: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.5);
  --navbar-bg: #1a1a1a;
  --navbar-text: #ffffff;
  --footer-bg: #1a1a1a;
  --footer-text: #b0b0b0;
}

/* Apply dark mode to body */
[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .bg-white {
  background-color: var(--card-bg) !important;
  border-color: var(--card-border) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .bg-light {
  background-color: var(--bg-secondary) !important;
}

/* Text colors */
[data-theme="dark"] .text-dark {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .text-secondary {
  color: var(--text-secondary) !important;
}

/* Borders */
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
  border-color: var(--border-color) !important;
}

/* Inputs */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-check-input {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: var(--input-bg) !important;
  border-color: #0dcaf0 !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .form-select option,
[data-theme="dark"] select option,
[data-theme="dark"] .form-select optgroup {
  background-color: #1f1f1f !important;
  color: #ffffff !important;
}

[data-theme="dark"] .form-select option:checked,
[data-theme="dark"] select option:checked {
  background-color: #0dcaf0 !important;
  color: #0a0a0a !important;
}

/* Tables */
[data-theme="dark"] .table {
  color: var(--text-primary) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > td {
  background-color: var(--bg-tertiary) !important;
}

/* Dropdowns */
[data-theme="dark"] .dropdown-menu {
  background-color: #2d2d2d !important;
  border-color: var(--border-color) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #ffffff !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background-color: #3a3a3a !important;
  color: #ffffff !important;
}

/* Dropdown header */
[data-theme="dark"] .dropdown-header {
  color: #b0b0b0 !important;
}

/* Dropdown divider */
[data-theme="dark"] .dropdown-divider {
  border-color: #404040 !important;
}

/* Navbar */
[data-theme="dark"] .navbar {
  background-color: var(--navbar-bg) !important;
  border-bottom-color: #404040 !important;
}

[data-theme="dark"] .navbar-brand,
[data-theme="dark"] .navbar-nav .nav-link,
[data-theme="dark"] .nav-link {
  color: #ffffff !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover,
[data-theme="dark"] .navbar-nav .nav-link:focus {
  color: #0dcaf0 !important;
}

[data-theme="dark"] .navbar .btn-info {
  background-color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
  color: #0a0a0a !important;
}

[data-theme="dark"] .navbar .btn-outline-info {
  color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
}

[data-theme="dark"] .navbar .btn-outline-info:hover {
  background-color: #0dcaf0 !important;
  color: #0a0a0a !important;
}

[data-theme="dark"] .navbar .btn-light,
[data-theme="dark"] .theme-toggle-btn {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .theme-toggle-icon {
  color: #ffffff !important;
}

/* Navbar toggle icon for mobile */
[data-theme="dark"] .navbar-toggler {
  border-color: #404040 !important;
}

[data-theme="dark"] .navbar-toggler-icon {
  filter: invert(1);

[data-theme="dark"] .notif-dropdown {
  background-color: #2b2b2b !important;
  border-color: #404040 !important;
}

[data-theme="dark"] .notif-item {
  border-left-color: #0dcaf0 !important;
}
}

/* Footer */
[data-theme="dark"] footer {
  background-color: var(--footer-bg) !important;
  color: var(--footer-text) !important;
}

/* Modals */
[data-theme="dark"] .modal-content {
  background-color: var(--card-bg) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: var(--border-color) !important;
}

/* Alerts */
[data-theme="dark"] .alert {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Shadows */
[data-theme="dark"] .shadow,
[data-theme="dark"] .shadow-sm {
  box-shadow: 0 0.125rem 0.25rem var(--shadow) !important;
}

[data-theme="dark"] .shadow-lg {
  box-shadow: 0 1rem 3rem var(--shadow-lg) !important;
}

/* Ana Sayfa Kategori Kartları */
[data-theme="dark"] .image-wrapper::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.85)) !important;
}

[data-theme="dark"] .split:hover .image-wrapper::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.75)) !important;
}

[data-theme="dark"] .btn-go {
  background-color: rgba(45, 45, 45, 0.95) !important;
  color: #ffffff !important;
  border: 2px solid #0dcaf0 !important;
  box-shadow: 0 8px 20px rgba(13, 202, 240, 0.3) !important;
}

[data-theme="dark"] .btn-go:hover {
  background-color: #0dcaf0 !important;
  color: #1a1a1a !important;
  border-color: #0dcaf0 !important;
  box-shadow: 0 12px 30px rgba(13, 202, 240, 0.5) !important;
}

/* Links */
[data-theme="dark"] a {
  color: #0dcaf0;
}

[data-theme="dark"] a:hover {
  color: #0aa2c0;
}

/* Transitions */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- EKSİK OLAN OKUNABİLİRLİK AYARLARI --- */

/* 1. Input Placeholder (Silik Yazı) Rengi */
[data-theme="dark"] ::placeholder {
  color: #adb5bd !important;
  opacity: 1;
}

/* 2. Link Renkleri (Koyu Mavi yerine Açık Mavi) */
[data-theme="dark"] a:not(.btn):not(.nav-link) {
  color: #6ea8fe !important;
}
[data-theme="dark"] a:hover:not(.btn):not(.nav-link) {
  color: #9ec5fe !important;
}

/* 3. Navbar ve Dropdown Düzeltmeleri */
[data-theme="dark"] .nav-link,
[data-theme="dark"] .dropdown-item {
  color: var(--text-primary) !important;
}
[data-theme="dark"] .dropdown-menu {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background-color: var(--bg-tertiary) !important;
  color: #fff !important;
}

/* 4. Tablo Satırları (Striped tabloları düzeltir) */
[data-theme="dark"] .table {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  color: var(--text-primary) !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* 5. Kart Başlıkları ve Text-Muted */
[data-theme="dark"] .text-muted {
  color: #b0b0b0 !important; /* Daha okunur gri */
}
[data-theme="dark"] .text-dark {
  color: #e0e0e0 !important; /* text-dark sınıfını ezer */
}

/* 7. Header (navbar) koyu arka plan ve link renkleri */
[data-theme="dark"] .header {
  background: #1a1a1a !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
  border-bottom: 1px solid #2e2e2e !important;
}
[data-theme="dark"] .header .logo-img { filter: brightness(0.9); }
[data-theme="dark"] .header a,
[data-theme="dark"] .header .nav-link,
[data-theme="dark"] .header .fw-semibold {
  color: #ffffff !important;
}
[data-theme="dark"] .header .nav-link:hover,
[data-theme="dark"] .header .nav-link:focus {
  color: #0dcaf0 !important;
}
[data-theme="dark"] .header .btn-outline-primary {
  color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
}
[data-theme="dark"] .header .btn-outline-primary:hover {
  background: #0dcaf0 !important;
  color: #0a0a0a !important;
}

/* 8. İlan listesi genel arka planları koyulaştır */
[data-theme="dark"] body {
  background-color: #111111 !important;
}
[data-theme="dark"] .section-box,
[data-theme="dark"] .job-list-layout,
[data-theme="dark"] .job-content,
[data-theme="dark"] .job-list,
[data-theme="dark"] .job-list .card,
[data-theme="dark"] .bg-white.job-list,
[data-theme="dark"] .bg-white.job-content {
  background-color: #181818 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .job-list .card,
[data-theme="dark"] .job-list .card-body {
  border-color: #2e2e2e !important;
}
[data-theme="dark"] .job-list .text-muted { color: #b0b0b0 !important; }
[data-theme="dark"] .job-list .text-dark { color: #e0e0e0 !important; }

/* --- SELECT KUTULARI (DROPDOWN) DÜZELTMESİ --- */

/* 1. Kutunun kendisi (Kapalı Hali) */
[data-theme="dark"] .select2-container--default .select2-selection--single,
[data-theme="dark"] select.form-control,
[data-theme="dark"] select.form-select {
    background-color: #121212 !important; /* Tam Siyah'a yakın koyu */
    border-color: #404040 !important;     /* Kenarlık rengi */
    color: #ffffff !important;            /* Yazı rengi */
}

/* 2. İçindeki Yazı (Seçili Olan) */
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* 3. "Seçin" Yazısı (Placeholder - Silik Yazı) */
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #b0b0b0 !important; /* Açık gri */
}

/* 4. Yanındaki Ok İşareti (Arrow) */
[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #ffffff transparent transparent transparent !important; /* Oku beyaz yap */
}

/* --- AÇILAN LİSTE (DROPDOWN MENU) --- */

/* 5. Açılır Menü Çerçevesi */
[data-theme="dark"] .select2-dropdown {
    background-color: #1a1a1a !important;
    border: 1px solid #404040 !important;
}

/* 6. Arama Kutusu (Varsa) */
[data-theme="dark"] .select2-search__field {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

/* 7. Liste Seçenekleri */
[data-theme="dark"] .select2-results__option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* 8. Üzerine Gelinen (Hover) veya Seçili Eleman */
[data-theme="dark"] .select2-results__option--highlighted[aria-selected] {
    background-color: #0dcaf0 !important; /* Tema rengin (Mavi/Cyan) */
    color: #000000 !important;            /* Üzerindeki yazı siyah olsun ki okunsun */
}

/* Ek koyulaştırma: açılır liste içi tamamen siyah, yazılar beyaz */
[data-theme="dark"] .select2-container--default .select2-results > .select2-results__options,
[data-theme="dark"] .select2-container--default .select2-results__option,
[data-theme="dark"] .select2-results__option[aria-selected],
[data-theme="dark"] .select2-dropdown {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}
[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}
[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

/* MULTIPLE SELECT (İl/İlçe çoklu seçim) - Açılır liste ve kapalı kutu */
[data-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #0a0a0a !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    background-color: transparent !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #17a2b8 !important;
    border-color: #0dcaf0 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-search__field {
    background-color: transparent !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #888888 !important;
}

/* Select2 dropdown scroll alanı ve tüm iç elemanlar */
[data-theme="dark"] .select2-results {
    background-color: #0a0a0a !important;
}
[data-theme="dark"] .select2-results__options {
    background-color: #0a0a0a !important;
}
[data-theme="dark"] .select2-results__option {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}
[data-theme="dark"] .select2-results__option:hover {
    background-color: #1a1a1a !important;
}
[data-theme="dark"] .select2-results__option--selectable {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

/* 6. İlanlar Sayfası Filtre Sidebar */
[data-theme="dark"] #mobileFilters .bg-white,
[data-theme="dark"] #mobileFilters > div {
  background-color: #1a1a1a !important;
  border-color: #404040 !important;
}

[data-theme="dark"] #mobileFilters .form-label,
[data-theme="dark"] #mobileFilters label,
[data-theme="dark"] #mobileFilters .form-check-label {
  color: #ffffff !important;
}

[data-theme="dark"] #mobileFilters .form-control,
[data-theme="dark"] #mobileFilters .form-select {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
  color: #ffffff !important;
}

[data-theme="dark"] #mobileFilters .form-control::placeholder {
  color: #808080 !important;
}

[data-theme="dark"] #mobileFilters .form-select option {
  background-color: #1a1a1a !important;
  color: #ffffff !important;
}

/* --- CHOICES.JS DARK MODE STİLLERİ --- */

/* 1. Kapalı kutu (input alanı) */
[data-theme="dark"] .choices,
[data-theme="dark"] .choices__inner {
    background-color: #0a0a0a !important;
    border-color: #404040 !important;
}

/* 2. Placeholder ve input yazısı */
[data-theme="dark"] .choices__input,
[data-theme="dark"] .choices__input--cloned,
[data-theme="dark"] .choices__placeholder {
    background-color: transparent !important;
    color: #ffffff !important;
}
[data-theme="dark"] .choices__input::placeholder,
[data-theme="dark"] .choices__placeholder {
    color: #888888 !important;
}

/* 3. Seçili etiketler (chip'ler) */
[data-theme="dark"] .choices__item--selectable,
[data-theme="dark"] .choices__item.choices__item--choice {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}
[data-theme="dark"] .choices__item.is-highlighted {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}

/* 4. Seçilmiş etiket (multiple seçimde) */
[data-theme="dark"] .choices__list--multiple .choices__item {
    background-color: #17a2b8 !important;
    border-color: #0dcaf0 !important;
    color: #ffffff !important;
}

/* 5. Açılır liste (dropdown) */
[data-theme="dark"] .choices__list--dropdown,
[data-theme="dark"] .choices__list[aria-expanded] {
    background-color: #0a0a0a !important;
    border-color: #404040 !important;
}

/* 6. Dropdown içindeki seçenekler */
[data-theme="dark"] .choices__list--dropdown .choices__item,
[data-theme="dark"] .choices__list--dropdown .choices__item--selectable {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

/* 7. Hover durumu */
[data-theme="dark"] .choices__list--dropdown .choices__item--selectable.is-highlighted,
[data-theme="dark"] .choices__list--dropdown .choices__item:hover {
    background-color: #0dcaf0 !important;
    color: #000000 !important;
}

/* 8. Arama kutusu (dropdown içi) */
[data-theme="dark"] .choices__list--dropdown .choices__input {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

