/* ============================================================
   UYGULAMA — KOYU TEMA (dark mode)
   ------------------------------------------------------------
   Bu dosya SADECE <html data-bs-theme="dark"> iken devreye girer;
   açık tema (style.css) hiçbir şekilde değiştirilmedi.

   Renk düzeni Yönetim paneliyle AYNI (2026-11-16): Test API
   paleti, lacivert-siyah taban #0d1219, vurgu MAVİ, düz ve canlı
   butonlar. :root içindeki --dk-* değişkenleri ve ortak bölümler
   (modal, tablo, form, rozet, buton) Yönetim/public/assets/panel/
   css/dark.css ile birebir aynıdır; bir rengi değiştirirken iki
   dosyayı birlikte güncelleyin. --dk-* adları açık temada hiçbir
   kuralda kullanılmaz, yani :root'ta durmaları açık temayı etkilemez.

   Önceki (kahve tonlu) sürüm: Yedekler/2026-11-16-uygulama-dark-oncesi
   ============================================================ */


:root {
    /* Yüzeyler */
    --dk-bg:            #070a0d;   /* sayfa zemini */
    --dk-surface:       #151c26;   /* kart, topbar */
    --dk-surface-2:     #1a2330;   /* form, modal, dropdown, tablo başlığı */
    --dk-surface-3:     #1f2a38;   /* ikincil rozet zemini */
    --dk-hover:         #223044;   /* topbar ikon / sayfalama hover */
    --dk-subtle:        #18202b;   /* hafif zemin (gray-100) */
    --dk-side-bg:       #0f151e;   /* sidebar */
    --dk-side-active:   #18243a;   /* sidebar aktif öğe */
    --dk-side-text:     #c4cfdc;
    --dk-side-line:     rgba(255, 255, 255, 0.06);
    --dk-side-hover:    rgba(255, 255, 255, 0.05);
    --dk-row-hover:     rgba(255, 255, 255, 0.03);

    /* Kenarlık ve metin */
    --dk-border:        #253141;
    --dk-border-strong: #324155;
    --dk-border-hover:  #3d4f66;
    --dk-gray-400:      #56657a;
    --dk-text:          #e6edf3;
    --dk-text-muted:    #9aa7b6;
    --dk-text-faint:    #6f7d8e;

    /* Vurgu: mavi */
    --dk-blue:          #3b82f6;   /* dolgu */
    --dk-blue-strong:   #2563eb;
    --dk-blue-text:     #6ea8ec;   /* metin, çizgi, odak */
    --dk-blue-text-2:   #9cc3f3;   /* link hover */
    --dk-blue-soft:     rgba(110, 168, 236, 0.14);
    --dk-blue-ring:     rgba(110, 168, 236, 0.22);
    --dk-blue-glow:     rgba(59, 130, 246, 0.25);

    /* Anlam renkleri (koyu zemine uygun tonlar) */
    --dk-ok:            #48bb78;   --dk-ok-soft:     rgba(72, 187, 120, 0.14);
    --dk-warn:          #ecc94b;   --dk-warn-soft:   rgba(236, 201, 75, 0.13);
    --dk-danger:        #fc8181;   --dk-danger-soft: rgba(252, 129, 129, 0.13);
    --dk-info:          #6ea8ec;   --dk-info-soft:   rgba(110, 168, 236, 0.13);

    /* Gölgeler ve buton ışığı */
    --dk-shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.3);
    --dk-shadow:        0 10px 30px rgba(0, 0, 0, 0.45);
    --dk-btn-radius:    7px;       /* Test API --radius-sm */
    --dk-btn-text:      #ffffff;   /* dolu canlı renkli düğmelerde beyaz yazı */
}

/* Tema geçişinde yumuşak animasyon — sınıf SADECE geçiş anında
   JS tarafından ~450ms eklenir, normal durumda hiçbir etkisi yok. */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, fill .4s ease !important;
}

/* ============================================================
   style.css token'larının koyu karşılıkları
   ============================================================ */
html[data-bs-theme="dark"] {
    color-scheme: dark;

    --bg:        var(--dk-bg);
    --surface:   var(--dk-surface);
    --surface-2: var(--dk-surface-2);

    --primary:        var(--dk-blue);
    --primary-dark:   var(--dk-blue-strong);
    --primary-light:  var(--dk-blue-soft);
    --info:           var(--dk-info);
    --success:        var(--dk-ok);
    --warning:        var(--dk-warn);
    --light:          var(--dk-bg);
    --dark:           var(--dk-text);
    --gray-100:       var(--dk-subtle);
    --gray-200:       var(--dk-border);
    --gray-300:       var(--dk-border-strong);
    --gray-400:       var(--dk-gray-400);
    --gray-500:       var(--dk-text-faint);
    --gray-600:       var(--dk-text-muted);

    /* Bootstrap 5.3 dark değişkenleri */
    --bs-body-bg:            var(--dk-surface-2);
    --bs-body-bg-rgb:        26, 35, 48;
    --bs-body-color:         var(--dk-text);
    --bs-body-color-rgb:     230, 237, 243;
    --bs-emphasis-color:     #ffffff;
    --bs-secondary-color:    var(--dk-text-muted);
    --bs-secondary-bg:       var(--dk-subtle);
    --bs-tertiary-bg:        var(--dk-subtle);
    --bs-tertiary-color:     var(--dk-text-faint);
    --bs-border-color:       var(--dk-border-strong);
    --bs-border-color-translucent: rgba(230, 237, 243, 0.10);
    --bs-primary:            var(--dk-blue);
    --bs-primary-rgb:        59, 130, 246;
    --bs-link-color:         var(--dk-blue-text);
    --bs-link-color-rgb:     110, 168, 236;
    --bs-link-hover-color:   var(--dk-blue-text-2);
    --bs-link-hover-color-rgb: 156, 195, 243;
    --bs-success-text-emphasis: var(--dk-ok);
    --bs-success-bg-subtle:     var(--dk-ok-soft);
    --bs-danger-text-emphasis:  var(--dk-danger);
    --bs-danger-bg-subtle:      var(--dk-danger-soft);
    --bs-warning-text-emphasis: var(--dk-warn);
    --bs-warning-bg-subtle:     var(--dk-warn-soft);
    --bs-info-text-emphasis:    var(--dk-info);
    --bs-info-bg-subtle:        var(--dk-info-soft);
    --bs-primary-text-emphasis: var(--dk-blue-text);
    --bs-primary-bg-subtle:     var(--dk-blue-soft);

    /* Sabit tablo başlıklarının arka planı (liste sayfalarındaki inline stil kullanır) */
    --sticky-th-bg: var(--dk-surface-2);
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .adm-body {
    background: var(--dk-bg);
    color: var(--dk-text);
}

/* ============================================================
   KARTLAR
   ============================================================ */
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .dash-card,
html[data-bs-theme="dark"] .dash-stat-card,
html[data-bs-theme="dark"] .dash-donut-card,
html[data-bs-theme="dark"] .dash-quota-item,
html[data-bs-theme="dark"] .dash-module-card {
    background-color: var(--dk-surface);
    border-color: var(--dk-border);
    box-shadow: var(--dk-shadow-sm);
}
html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer {
    background-color: transparent;
    border-color: var(--dk-border);
}
html[data-bs-theme="dark"] .dash-stat-card:hover,
html[data-bs-theme="dark"] .dash-quota-item:hover,
html[data-bs-theme="dark"] .dash-module-card:hover {
    border-color: var(--dk-blue-text);
    box-shadow: 0 4px 16px var(--dk-blue-glow);
}
/* Duyuru kutusu: yeşil yerine mavi */
html[data-bs-theme="dark"] .dash-announcement {
    background-color: var(--dk-blue-soft);
    border-color: rgba(110, 168, 236, 0.35);
}
html[data-bs-theme="dark"] .dash-announcement > i { color: var(--dk-blue-text); }

/* ============================================================
   MODAL / DROPDOWN (bir kademe açık yüzey: yükselti hissi)
   ============================================================ */
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .adm-dropdown__menu {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border-strong);
    color: var(--dk-text);
    box-shadow: var(--dk-shadow);
}
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer { border-color: var(--dk-border); }
html[data-bs-theme="dark"] .dropdown-item,
html[data-bs-theme="dark"] .adm-dropdown__item { color: var(--dk-text); }
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus,
html[data-bs-theme="dark"] .adm-dropdown__item:hover {
    background-color: var(--dk-blue-soft);
    color: #fff;
}
html[data-bs-theme="dark"] .adm-dropdown__divider,
html[data-bs-theme="dark"] .dropdown-divider { border-color: var(--dk-border); background-color: var(--dk-border); }
html[data-bs-theme="dark"] .modal-backdrop { --bs-backdrop-bg: #05080c; --bs-backdrop-opacity: .65; }
html[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* Tooltip */
html[data-bs-theme="dark"] .tooltip { --bs-tooltip-bg: var(--dk-text); --bs-tooltip-color: var(--dk-surface); }

/* ============================================================
   TABLOLAR
   ============================================================ */
html[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--dk-text);
    --bs-table-border-color: var(--dk-border);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-striped-color: var(--dk-text);
    --bs-table-hover-bg: var(--dk-row-hover);
    --bs-table-hover-color: var(--dk-text);
}
html[data-bs-theme="dark"] .table > thead > tr > th {
    background-color: var(--dk-surface-2);
    color: var(--dk-text-muted);
}

/* ============================================================
   FORM ALANLARI
   ============================================================ */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group-text {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border-strong);
    color: var(--dk-text);
}
html[data-bs-theme="dark"] .form-control::placeholder { color: var(--dk-text-faint); }
html[data-bs-theme="dark"] .form-control:disabled,
html[data-bs-theme="dark"] .form-control[readonly],
html[data-bs-theme="dark"] .form-select:disabled {
    background-color: var(--dk-subtle);
    color: var(--dk-text-muted);
}
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-blue-text);
    box-shadow: 0 0 0 3px var(--dk-blue-ring);
}

/* Bootstrap 5.3.3 bu bileşenlerde mavi rengi (#0d6efd) SABİT yazıyor,
   --bs-primary'ye bağlı değil — koyu temanın mavisine çekiliyor. */
html[data-bs-theme="dark"] .nav-pills {
    --bs-nav-pills-link-active-bg: var(--dk-side-active);
    --bs-nav-pills-link-active-color: #fff;
}
html[data-bs-theme="dark"] .nav-pills .nav-link.active { box-shadow: inset 3px 0 0 var(--dk-blue-text); }
html[data-bs-theme="dark"] .nav-tabs { --bs-nav-tabs-border-color: var(--dk-border); --bs-nav-tabs-link-active-bg: var(--dk-surface); --bs-nav-tabs-link-active-border-color: var(--dk-border) var(--dk-border) var(--dk-surface); --bs-nav-tabs-link-active-color: var(--dk-blue-text); }
html[data-bs-theme="dark"] .form-check-input:checked,
html[data-bs-theme="dark"] .form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--dk-blue);
    border-color: var(--dk-blue);
}
html[data-bs-theme="dark"] .form-check-input:not(:checked) {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-gray-400);
}
html[data-bs-theme="dark"] .form-check-input:focus {
    border-color: var(--dk-blue-text);
    box-shadow: 0 0 0 3px var(--dk-blue-ring);
}
html[data-bs-theme="dark"] .page-link {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border-strong);
    color: var(--dk-text);
}
html[data-bs-theme="dark"] .page-link:hover { background-color: var(--dk-hover); color: #fff; }
html[data-bs-theme="dark"] .page-item.active .page-link,
html[data-bs-theme="dark"] .active > .page-link {
    background: var(--dk-blue);
    border-color: var(--dk-blue);
    color: var(--dk-btn-text);
}
html[data-bs-theme="dark"] .page-item.disabled .page-link { background-color: var(--dk-subtle); color: var(--dk-text-faint); }

/* ============================================================
   ROZETLER / UYARILAR (yumuşak zemin + renkli metin)
   ============================================================ */
html[data-bs-theme="dark"] .badge.bg-primary, html[data-bs-theme="dark"] .badge.text-bg-primary { background-color: var(--dk-blue-soft) !important; color: var(--dk-blue-text) !important; }
html[data-bs-theme="dark"] .badge.bg-info,    html[data-bs-theme="dark"] .badge.text-bg-info    { background-color: var(--dk-info-soft) !important; color: var(--dk-info) !important; }
html[data-bs-theme="dark"] .badge.bg-success, html[data-bs-theme="dark"] .badge.text-bg-success { background-color: var(--dk-ok-soft) !important; color: var(--dk-ok) !important; }
html[data-bs-theme="dark"] .badge.bg-danger,  html[data-bs-theme="dark"] .badge.text-bg-danger  { background-color: var(--dk-danger-soft) !important; color: var(--dk-danger) !important; }
html[data-bs-theme="dark"] .badge.bg-warning, html[data-bs-theme="dark"] .badge.text-bg-warning { background-color: var(--dk-warn-soft) !important; color: var(--dk-warn) !important; }
html[data-bs-theme="dark"] .badge.bg-secondary, html[data-bs-theme="dark"] .badge.text-bg-secondary { background-color: var(--dk-surface-3) !important; color: var(--dk-text-muted) !important; }
html[data-bs-theme="dark"] .text-bg-light { background-color: var(--dk-subtle) !important; color: var(--dk-text) !important; }
html[data-bs-theme="dark"] .text-muted { color: var(--dk-text-muted) !important; }
html[data-bs-theme="dark"] .text-primary { color: var(--dk-blue-text) !important; }
html[data-bs-theme="dark"] .text-success { color: var(--dk-ok) !important; }
html[data-bs-theme="dark"] .text-danger { color: var(--dk-danger) !important; }
html[data-bs-theme="dark"] .text-warning { color: var(--dk-warn) !important; }
html[data-bs-theme="dark"] .text-info { color: var(--dk-info) !important; }
html[data-bs-theme="dark"] .bg-primary-subtle { background-color: var(--dk-blue-soft) !important; }
html[data-bs-theme="dark"] .bg-success-subtle { background-color: var(--dk-ok-soft) !important; }
html[data-bs-theme="dark"] .bg-danger-subtle { background-color: var(--dk-danger-soft) !important; }
html[data-bs-theme="dark"] .bg-warning-subtle { background-color: var(--dk-warn-soft) !important; }
html[data-bs-theme="dark"] .bg-info-subtle { background-color: var(--dk-info-soft) !important; }
html[data-bs-theme="dark"] .alert-primary,
html[data-bs-theme="dark"] .alert-info { background-color: var(--dk-info-soft); border-color: rgba(110, 168, 236, 0.35); color: var(--dk-text); }
html[data-bs-theme="dark"] .alert-success { background-color: var(--dk-ok-soft); border-color: rgba(72, 187, 120, 0.35); color: var(--dk-text); }
html[data-bs-theme="dark"] .alert-warning { background-color: var(--dk-warn-soft); border-color: rgba(236, 201, 75, 0.35); color: var(--dk-text); }
html[data-bs-theme="dark"] .alert-danger { background-color: var(--dk-danger-soft); border-color: rgba(252, 129, 129, 0.35); color: var(--dk-text); }
html[data-bs-theme="dark"] hr { border-color: var(--dk-border-strong); opacity: 1; }
html[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: var(--dk-gray-400); }

/* Sabit renkli açık-tema bileşenleri */
html[data-bs-theme="dark"] .contact-notes-remove-row { background-color: var(--dk-danger-soft); }
html[data-bs-theme="dark"] .info-picker-row:hover { background-color: var(--dk-blue-soft); }

/* Kaydırma çubukları */
html[data-bs-theme="dark"] * { scrollbar-color: var(--dk-border-strong) transparent; }
html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background-color: var(--dk-border-strong); }
html[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background-color: var(--dk-border-hover); }


/* ============================================================
   BUTONLAR — Test API düzeni: düz (gradyansız, gölgesiz) düğmeler.
   • Birincil: dolu canlı mavi zemin (#3b82f6), beyaz yazı.
   • İkincil: kart yüzeyi + ince kenarlık, açık yazı; hover'da bir ton açık.
   • Renkli dolu düğmeler (danger/warning/success/excel/whatsapp) aynı
     düz yapıyı kendi renkleriyle alır: --b-bg / --b-hover.
   ============================================================ */
html[data-bs-theme="dark"] .btn {
    border-radius: var(--dk-btn-radius);
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
html[data-bs-theme="dark"] .btn:active { transform: translateY(1px); }

/* Renkli dolu düğmeler: ortak yapı */
html[data-bs-theme="dark"] .btn-primary,
html[data-bs-theme="dark"] .btn-danger,
html[data-bs-theme="dark"] .btn-warning,
html[data-bs-theme="dark"] .btn-success,
html[data-bs-theme="dark"] .btn-excel,
html[data-bs-theme="dark"] .btn-whatsapp {
    background: var(--b-bg);
    border: 1px solid var(--b-bg);
    color: var(--dk-btn-text);
    box-shadow: none;
}
html[data-bs-theme="dark"] .btn-primary:hover,
html[data-bs-theme="dark"] .btn-danger:hover,
html[data-bs-theme="dark"] .btn-warning:hover,
html[data-bs-theme="dark"] .btn-success:hover,
html[data-bs-theme="dark"] .btn-excel:hover,
html[data-bs-theme="dark"] .btn-whatsapp:hover,
html[data-bs-theme="dark"] .btn-primary:active,
html[data-bs-theme="dark"] .btn-danger:active,
html[data-bs-theme="dark"] .btn-warning:active,
html[data-bs-theme="dark"] .btn-success:active,
html[data-bs-theme="dark"] .btn-excel:active,
html[data-bs-theme="dark"] .btn-whatsapp:active {
    background: var(--b-hover);
    border-color: var(--b-hover);
    color: var(--dk-btn-text);
}
html[data-bs-theme="dark"] .btn-primary:focus-visible,
html[data-bs-theme="dark"] .btn-danger:focus-visible,
html[data-bs-theme="dark"] .btn-warning:focus-visible,
html[data-bs-theme="dark"] .btn-success:focus-visible,
html[data-bs-theme="dark"] .btn-excel:focus-visible,
html[data-bs-theme="dark"] .btn-whatsapp:focus-visible {
    box-shadow: 0 0 0 3px var(--dk-blue-ring);
}
html[data-bs-theme="dark"] .btn-primary   { --b-bg: var(--dk-blue);      --b-hover: var(--dk-blue-strong); }
html[data-bs-theme="dark"] .btn-danger    { --b-bg: #e42527;             --b-hover: #c91f21; }
html[data-bs-theme="dark"] .btn-warning   { --b-bg: #f59e0b;             --b-hover: #d97706; }
html[data-bs-theme="dark"] .btn-success   { --b-bg: #16a34a;             --b-hover: #15803d; }
html[data-bs-theme="dark"] .btn-excel     { --b-bg: #1d6f42;             --b-hover: #165c35; }
html[data-bs-theme="dark"] .btn-whatsapp  { --b-bg: #25d366;             --b-hover: #1ebe5b; }
html[data-bs-theme="dark"] .btn:disabled,
html[data-bs-theme="dark"] .btn.disabled { opacity: .55; }

/* İkincil (yüzey) düğmeler */
html[data-bs-theme="dark"] .btn-secondary,
html[data-bs-theme="dark"] .btn-light,
html[data-bs-theme="dark"] .btn-outline-secondary,
html[data-bs-theme="dark"] .btn-outline-dark,
html[data-bs-theme="dark"] .btn-outline-light,
html[data-bs-theme="dark"] .btn-outline,
html[data-bs-theme="dark"] .export-format-btn,
html[data-bs-theme="dark"] .permission-toggle-btn,
html[data-bs-theme="dark"] .design-icon-toggle-btn {
    background: var(--dk-surface);
    border: 1px solid var(--dk-border-strong);
    color: var(--dk-text);
    box-shadow: none;
}
html[data-bs-theme="dark"] .btn-secondary:hover,
html[data-bs-theme="dark"] .btn-light:hover,
html[data-bs-theme="dark"] .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .btn-outline-dark:hover,
html[data-bs-theme="dark"] .btn-outline-light:hover,
html[data-bs-theme="dark"] .btn-outline:hover,
html[data-bs-theme="dark"] .export-format-btn:hover,
html[data-bs-theme="dark"] .permission-toggle-btn:hover,
html[data-bs-theme="dark"] .design-icon-toggle-btn:hover,
html[data-bs-theme="dark"] .btn-secondary:active,
html[data-bs-theme="dark"] .btn-outline-secondary:active,
html[data-bs-theme="dark"] .btn-outline-secondary.active {
    background: var(--dk-surface-2);
    border-color: var(--dk-border-strong);
    color: var(--dk-text);
}
html[data-bs-theme="dark"] .btn-secondary:focus-visible,
html[data-bs-theme="dark"] .btn-light:focus-visible,
html[data-bs-theme="dark"] .btn-outline-secondary:focus-visible {
    box-shadow: 0 0 0 3px var(--dk-blue-ring);
}

/* Çerçeveli renkli düğmeler: yumuşak zemin + renkli metin */
html[data-bs-theme="dark"] .btn-outline-primary { --o: var(--dk-blue-text); --o-soft: var(--dk-blue-soft); }
html[data-bs-theme="dark"] .btn-outline-danger  { --o: var(--dk-danger);    --o-soft: var(--dk-danger-soft); }
html[data-bs-theme="dark"] .btn-outline-success { --o: var(--dk-ok);        --o-soft: var(--dk-ok-soft); }
html[data-bs-theme="dark"] .btn-outline-warning { --o: var(--dk-warn);      --o-soft: var(--dk-warn-soft); }
html[data-bs-theme="dark"] .btn-outline-info    { --o: var(--dk-info);      --o-soft: var(--dk-info-soft); }
html[data-bs-theme="dark"] .btn-outline-primary,
html[data-bs-theme="dark"] .btn-outline-danger,
html[data-bs-theme="dark"] .btn-outline-success,
html[data-bs-theme="dark"] .btn-outline-warning,
html[data-bs-theme="dark"] .btn-outline-info {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--o) 55%, transparent);
    color: var(--o);
}
html[data-bs-theme="dark"] .btn-outline-primary:hover,
html[data-bs-theme="dark"] .btn-outline-danger:hover,
html[data-bs-theme="dark"] .btn-outline-success:hover,
html[data-bs-theme="dark"] .btn-outline-warning:hover,
html[data-bs-theme="dark"] .btn-outline-info:hover,
html[data-bs-theme="dark"] .btn-outline-primary.active,
html[data-bs-theme="dark"] .btn-outline-danger.active,
html[data-bs-theme="dark"] .btn-outline-success.active {
    background: var(--o-soft);
    border-color: var(--o);
    color: var(--o);
}
html[data-bs-theme="dark"] .btn-link { color: var(--dk-blue-text); }
html[data-bs-theme="dark"] .btn-link:hover { color: var(--dk-blue-text-2); }

/* ============================================================
   UYGULAMA'YA ÖZGÜ: üst şerit, menü, footer, kuyruk, ayarlar
   ============================================================ */

/* Üst bilgi şeridi (Hoş geldiniz / Son giriş) */
html[data-bs-theme="dark"] .dash-topbar {
    background-color: var(--dk-side-bg);
    border-bottom: 1px solid var(--dk-border);
    color: var(--dk-text-muted);
}
html[data-bs-theme="dark"] .dash-topbar-right { color: var(--dk-text-faint); }

/* Üst menü (masaüstü) ve mobil menü paneli */
html[data-bs-theme="dark"] .dash-navbar {
    background-color: var(--dk-surface);
    border-bottom-color: var(--dk-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
@media (max-width: 991.98px) {
    html[data-bs-theme="dark"] #dashNav,
    html[data-bs-theme="dark"] .dash-sidebar-header {
        background-color: var(--dk-surface);
        border-color: var(--dk-border);
    }
}
html[data-bs-theme="dark"] .dash-nav-link { color: var(--dk-side-text); }
html[data-bs-theme="dark"] .dash-nav-link:hover,
html[data-bs-theme="dark"] .dash-nav-link.active {
    color: var(--dk-blue-text);
    background-color: var(--dk-blue-soft);
}
html[data-bs-theme="dark"] .dash-nav-sep span { background-color: var(--dk-border-strong); }
html[data-bs-theme="dark"] .dash-navbar .dash-logo-img { filter: brightness(1.18) saturate(1.1); }

/* Sağdaki menü düğmeleri (kuyruk, tema, Ayarlar, Çıkış): düz ve canlı */
html[data-bs-theme="dark"] .dash-nav-btn {
    background-color: var(--dk-blue);
    border-color: var(--dk-blue);
    color: #fff;
}
html[data-bs-theme="dark"] .dash-nav-btn:hover {
    background-color: var(--dk-blue-strong);
    border-color: var(--dk-blue-strong);
    color: #fff;
}
html[data-bs-theme="dark"] .dash-nav-btn--danger { background-color: #e42527; border-color: #e42527; }
html[data-bs-theme="dark"] .dash-nav-btn--danger:hover { background-color: #c91f21; border-color: #c91f21; }

/* Tema anahtarı: aktif temaya göre ikon */
.theme-toggle { padding: 7px 12px; }
.theme-toggle .icon-sun { display: none; }
html[data-bs-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
html[data-bs-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Footer */
html[data-bs-theme="dark"] .dash-footer {
    background: linear-gradient(135deg, var(--dk-side-bg), var(--dk-bg));
    border-top: 1px solid var(--dk-border);
}
html[data-bs-theme="dark"] .dash-footer-address,
html[data-bs-theme="dark"] .dash-footer-copy,
html[data-bs-theme="dark"] .footer-credit p { color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .dash-footer-heading,
html[data-bs-theme="dark"] .dash-footer-social a,
html[data-bs-theme="dark"] .footer-credit a { color: var(--dk-text); }
html[data-bs-theme="dark"] .dash-footer-social a { background-color: rgba(255, 255, 255, 0.06); }
html[data-bs-theme="dark"] .dash-footer-social a:hover { background-color: var(--dk-blue); color: #fff; }
html[data-bs-theme="dark"] .dash-footer-bottom,
html[data-bs-theme="dark"] .footer-credit { border-top-color: var(--dk-border); }
html[data-bs-theme="dark"] .footer-credit { background-color: var(--dk-side-bg); }

/* Kuyruktaki işlemler menüsü ve sayfası */
html[data-bs-theme="dark"] .queue-menu,
html[data-bs-theme="dark"] .queue-menu-header,
html[data-bs-theme="dark"] .queue-menu-footer {
    background-color: var(--dk-surface-2);
    border-color: var(--dk-border);
}
html[data-bs-theme="dark"] .queue-menu-item,
html[data-bs-theme="dark"] .queue-table tr { border-color: var(--dk-border); }
html[data-bs-theme="dark"] .queue-menu-item:hover { background-color: var(--dk-blue-soft); }

/* Ayarlar > Operatör modalları: "Operatör API Bilgileri" paneli */
html[data-bs-theme="dark"] .operator-api-box {
    background: var(--dk-danger-soft);
    border: 1px solid rgba(252, 129, 129, 0.35);
}
html[data-bs-theme="dark"] .operator-api-title,
html[data-bs-theme="dark"] .operator-api-text,
html[data-bs-theme="dark"] .operator-api-box .form-label { color: var(--dk-text); }
html[data-bs-theme="dark"] .operator-api-required { color: var(--dk-danger); }
html[data-bs-theme="dark"] .operator-api-box .form-control {
    background-color: var(--dk-bg);
    border-color: var(--dk-border-strong);
    color: var(--dk-text);
}

/* ============================================================
   OTOMATİK — background: var(--white) → var(--surface) (32 kural)
   ============================================================ */
[data-bs-theme="dark"] .login-page .login-form-col {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .login-page .login-form .input-group-text {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .login-page .login-form .form-control {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .login-page .login-form .form-control:focus {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .login-page .login-form .btn-toggle-password {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dashboard-page {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-navbar {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-quota-item {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-module-card {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-footer-social a:hover {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .toolbar-search .input-group-text {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .panel-modal-sidebar .nav-link:hover {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .permission-toggle-btn {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .export-format-btn {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .panel-modal-info-table {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .panel-modal-info-table th {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .msg-image-tooltip .tooltip-inner {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .settings-operator-tab:hover {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .settings-operators-content {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .statement-summary-row td {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-stat-card {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .dash-donut-card {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .design-icon-toggle-btn {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .design-field .input-group-text {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .design-layers-panel {
    background-color: var(--surface);
}

/* Görsel tasarım editörü (2026-11-21): paneller, yakınlaştırma çubuğu, telefon alt çubuğu */
[data-bs-theme="dark"] .design-panel,
[data-bs-theme="dark"] .design-zoombar,
[data-bs-theme="dark"] .design-zoom-btn,
[data-bs-theme="dark"] .design-nudge button,
[data-bs-theme="dark"] .design-dock {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .design-stage {
    background-color: var(--dk-bg);
}

[data-bs-theme="dark"] .design-zoom-btn,
[data-bs-theme="dark"] .design-nudge button,
[data-bs-theme="dark"] .design-dock-btn {
    color: var(--dk-text-muted);
}

[data-bs-theme="dark"] .design-zoom-btn:hover,
[data-bs-theme="dark"] .design-nudge button:hover {
    background-color: var(--dk-hover);
}

[data-bs-theme="dark"] .design-dock-btn.active {
    color: var(--dk-blue-text);
}

[data-bs-theme="dark"] .design-sheet-close {
    background-color: var(--dk-surface-2);
    color: var(--dk-text-muted);
}

[data-bs-theme="dark"] .error-page-card {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .two-factor-box {
    background-color: var(--surface);
}

[data-bs-theme="dark"] .queue-menu,
[data-bs-theme="dark"] .queue-menu-header,
[data-bs-theme="dark"] .queue-menu-footer,
[data-bs-theme="dark"] .queue-menu-item,
[data-bs-theme="dark"] .queue-table tr {
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .info-picker-search-group .input-group-text {
    background-color: var(--surface);
}

@media (max-width: 991.98px) {
    [data-bs-theme="dark"] #dashNav {
        background-color: var(--surface);
    }
    
    [data-bs-theme="dark"] .dash-sidebar-header {
        background-color: var(--surface);
    }
}



/* ---- Kara Liste: SMS Başlıkları alanı ---- */
html[data-bs-theme="dark"] .bl-header-chip { background: var(--dk-blue); }
html[data-bs-theme="dark"] .bl-header-option { background: var(--dk-surface-2); border-color: var(--dk-border); color: var(--dk-text); }
html[data-bs-theme="dark"] .bl-header-option:hover,
html[data-bs-theme="dark"] .bl-header-option.is-selected { border-color: var(--dk-blue-text); background: rgba(59, 130, 246, .16); color: var(--dk-blue-text); }
html[data-bs-theme="dark"] .bl-header-options-label,
html[data-bs-theme="dark"] .bl-header-clear,
html[data-bs-theme="dark"] .bl-headers-hint { color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .bl-headers-input::placeholder { color: var(--dk-text-faint); }
html[data-bs-theme="dark"] .bl-header-badge { background: rgba(59, 130, 246, .16); color: var(--dk-blue-text); }
html[data-bs-theme="dark"] .bl-header-badge.is-all { background: rgba(228, 37, 39, .18); color: #ff6b6d; }

/* Ayarlar > Kurallar */
html[data-bs-theme="dark"] .rule-item { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .rule-item-title { color: var(--dk-text); }
html[data-bs-theme="dark"] .rule-group { background: var(--dk-surface-2); border-color: var(--dk-border); box-shadow: none; }
html[data-bs-theme="dark"] .rule-group-header { background: var(--dk-surface-3); border-color: var(--dk-border); color: var(--dk-text); }
html[data-bs-theme="dark"] .rule-group-icon { background: rgba(228, 37, 39, .18); color: #ff6b6d; }
html[data-bs-theme="dark"] .rule-group .rule-item { border-color: var(--dk-border); }

/* Seçim alt çubuğu: açık temada zemin --dark (koyu); koyu temada --dark açık renge döndüğü için yazı görünmüyordu */
html[data-bs-theme="dark"] .selection-bar { background-color: var(--dk-surface); border-top: 1px solid var(--dk-border); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.45); }
html[data-bs-theme="dark"] .selection-bar-info { color: var(--dk-text); }

/* Anket (2026-11-18) */
html[data-bs-theme="dark"] .survey-position-card,
html[data-bs-theme="dark"] .survey-summary,
html[data-bs-theme="dark"] .survey-stat,
html[data-bs-theme="dark"] .survey-question-card { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .survey-position-card:has(input:checked) { background: rgba(228, 37, 39, .1); border-color: #e42527; }
html[data-bs-theme="dark"] .spv-image { background: var(--dk-surface-3); color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .survey-summary-meta,
html[data-bs-theme="dark"] .survey-stat-label { color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .survey-bar { background: var(--dk-surface-3); }
html[data-bs-theme="dark"] .survey-text-answer { background: var(--dk-surface-3); color: var(--dk-text); }
html[data-bs-theme="dark"] .survey-builder-modal .modal-content { background: var(--dk-bg); }
html[data-bs-theme="dark"] .sb-list-pane,
html[data-bs-theme="dark"] .sb-editor,
html[data-bs-theme="dark"] .sb-mobile-tabs { background: var(--dk-surface); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .sb-preview-pane { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .sb-q-item { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .sb-q-item.is-active { border-color: #e42527; }
html[data-bs-theme="dark"] .sb-q-no { background: var(--dk-surface-3); color: var(--dk-text); }
html[data-bs-theme="dark"] .sb-q-type,
html[data-bs-theme="dark"] .sb-pane-title,
html[data-bs-theme="dark"] .sb-hint,
html[data-bs-theme="dark"] .sb-icon-btn { color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .sb-icon-btn:hover:not(:disabled) { background: var(--dk-surface-3); color: var(--dk-text); }
html[data-bs-theme="dark"] .sb-settings-link { border-color: var(--dk-border); color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .sb-type-note { background: rgba(59, 130, 246, .14); color: var(--dk-blue-text); }

/* Ayarlar > Kurallar — Kişi bilgisi doldurma (2026-11-20) */
html[data-bs-theme="dark"] .fill-rule-row { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .fill-rules-count { background: var(--dk-surface-3); color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .fill-rules-empty { border-color: var(--dk-border); }
html[data-bs-theme="dark"] .fill-confirm-values { background: var(--dk-surface-3); }
html[data-bs-theme="dark"] .fill-rule-arrow,
html[data-bs-theme="dark"] .fill-rules-note i { color: #ff6b6d; }

/* Form Sonuçları — ses kartları (2026-11-20) */
html[data-bs-theme="dark"] .survey-audio-card { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .survey-audio-label { color: var(--dk-text-muted); }

/* Form düzenleyici — Etiket ve Ses öğeleri (2026-11-20) */
html[data-bs-theme="dark"] .sb-track-no { background: var(--dk-surface-3); color: var(--dk-text); }
html[data-bs-theme="dark"] .sb-dropzone { background: var(--dk-surface-2); border-color: var(--dk-border); }
html[data-bs-theme="dark"] .sb-dropzone small { color: var(--dk-text-muted); }
html[data-bs-theme="dark"] .sb-upload-progress { background: var(--dk-surface-3); }
