/*
 * Nexora karanlık tema.
 * Şablonun (Vuexy) kendi bileşenleri html[data-bs-theme=dark] ile zaten karanlığa geçer; bu dosya
 * uygulamanın özel modüllerini (yönetim, değerlendirme, kurs, soru bankası, sınav, ayarlar, kayıtlar …) ve
 * sayfa içi stilleri uyumlu hale getirir. Alt bölüm tools/gen_dark.py ile otomatik üretilir.
 */
html[data-bs-theme=dark] {
  --nx-canvas: #25293c;
  --nx-surface: #2f3349;
  --nx-raised: #363b54;
  --nx-raised-2: #3d4260;
  --nx-line: #44485e;
  --nx-ink: #e4e3f1;
  --nx-text: #acabc1;
  --nx-muted: #9a9bb3;
  color-scheme: dark;
}

html[data-bs-theme=dark] body { background-color: var(--nx-canvas); }

/* Tema geçişinde ani parlama yerine yumuşak geçiş (yalnızca geçiş anında). */
html.nx-theme-switching, html.nx-theme-switching * , html.nx-theme-switching *::before, html.nx-theme-switching *::after {
  transition: background-color .25s ease, border-color .25s ease, color .2s ease, fill .2s ease !important;
}

/* Bootstrap'in temaya duyarsız yardımcı sınıfları */
html[data-bs-theme=dark] .bg-white { background-color: var(--bs-paper-bg) !important; }
html[data-bs-theme=dark] .bg-light, html[data-bs-theme=dark] .bg-lighter, html[data-bs-theme=dark] .bg-body-tertiary { background-color: var(--nx-raised) !important; }
html[data-bs-theme=dark] .text-dark, html[data-bs-theme=dark] .text-black, html[data-bs-theme=dark] .link-dark { color: var(--bs-heading-color) !important; }
html[data-bs-theme=dark] .text-muted { color: var(--nx-muted) !important; }
html[data-bs-theme=dark] .border-light { border-color: var(--nx-line) !important; }
html[data-bs-theme=dark] .table-light { --bs-table-bg: var(--nx-raised); --bs-table-color: var(--nx-ink); --bs-table-border-color: var(--nx-line); }
html[data-bs-theme=dark] .table { --bs-table-color: var(--bs-body-color); }
html[data-bs-theme=dark] .btn-light { --bs-btn-bg: var(--nx-raised-2); --bs-btn-color: var(--nx-ink); --bs-btn-border-color: var(--nx-line); --bs-btn-hover-bg: #474d6e; --bs-btn-hover-color: #fff; }
html[data-bs-theme=dark] .btn-outline-dark { --bs-btn-color: var(--nx-ink); --bs-btn-border-color: var(--nx-line); }
html[data-bs-theme=dark] .badge.bg-dark, html[data-bs-theme=dark] .bg-dark { background-color: #474d6e !important; }
html[data-bs-theme=dark] .form-control::placeholder { color: #7c7d96; }
html[data-bs-theme=dark] .dropdown-menu { --bs-dropdown-bg: var(--nx-surface); }
html[data-bs-theme=dark] .modal-content { background-color: var(--nx-surface); }
html[data-bs-theme=dark] code { color: #f18bba; }
html[data-bs-theme=dark] mark { background: #66401b; color: var(--nx-ink); }
html[data-bs-theme=dark] hr { border-color: var(--nx-line); }

/* DataTables ve tarih seçici gibi eklentiler */
html[data-bs-theme=dark] table.dataTable thead th, html[data-bs-theme=dark] table.dataTable thead td { border-bottom-color: var(--nx-line) !important; }
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--nx-text) !important; }
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--nx-raised-2) !important; border-color: var(--nx-line) !important; color: #fff !important; }
html[data-bs-theme=dark] .dataTables_wrapper .dataTables_length select, html[data-bs-theme=dark] .dataTables_wrapper .dataTables_filter input { background-color: var(--nx-surface); color: var(--nx-ink); border-color: var(--nx-line); }
html[data-bs-theme=dark] table.dataTable.stripe > tbody > tr.odd > *, html[data-bs-theme=dark] table.dataTable.display > tbody > tr.odd > *,
html[data-bs-theme=dark] .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, .025); }
html[data-bs-theme=dark] table.dataTable tbody tr { background-color: transparent; }
html[data-bs-theme=dark] .swal2-popup { background: var(--nx-surface); color: var(--nx-text); }
html[data-bs-theme=dark] .swal2-title, html[data-bs-theme=dark] .swal2-html-container { color: var(--nx-ink); }
html[data-bs-theme=dark] .flatpickr-calendar { background: var(--nx-surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
html[data-bs-theme=dark] .apexcharts-tooltip.apexcharts-theme-light { background: var(--nx-surface); border-color: var(--nx-line); color: var(--nx-ink); }
html[data-bs-theme=dark] .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { background: var(--nx-raised); border-color: var(--nx-line); }
html[data-bs-theme=dark] .apexcharts-text, html[data-bs-theme=dark] .apexcharts-legend-text { fill: var(--nx-text); color: var(--nx-text) !important; }

/* Marka logosu: koyu yazılı logo karanlık zeminde okunur kalsın diye açık bir zemin üzerinde gösterilir. */
html[data-bs-theme=dark] #layout-menu .brand-area img#logo,
html[data-bs-theme=dark] .app-brand-logo img,
html[data-bs-theme=dark] .auth-brand img { background: #f5f7fb; border-radius: 10px; padding: 4px 8px; }

/* Sayfa içi (style="…") açık renkler */
html[data-bs-theme=dark] [style*="background:#fff;"], html[data-bs-theme=dark] [style*="background: #fff;"],
html[data-bs-theme=dark] [style*="background:#fff\""], html[data-bs-theme=dark] [style*="background-color:#fff"],
html[data-bs-theme=dark] [style*="background-color: #fff"], html[data-bs-theme=dark] [style*="background:white"],
html[data-bs-theme=dark] [style*="background: white"], html[data-bs-theme=dark] [style*="background:#ffffff"],
html[data-bs-theme=dark] [style*="background: #ffffff"] { background-color: var(--nx-surface) !important; }
html[data-bs-theme=dark] [style*="background:#f7f9fc"], html[data-bs-theme=dark] [style*="background:#f8f9fa"],
html[data-bs-theme=dark] [style*="background: #f8f9fa"], html[data-bs-theme=dark] [style*="background-color:#f8f9fa"],
html[data-bs-theme=dark] [style*="background:#f5f5f5"], html[data-bs-theme=dark] [style*="background:#f1f5f9"] { background-color: var(--nx-raised) !important; }
html[data-bs-theme=dark] [style*="background:#fff8e6"], html[data-bs-theme=dark] [style*="background:#fff7ed"] { background-color: #4a3e26 !important; }
html[data-bs-theme=dark] [style*="background:#fff0f0"], html[data-bs-theme=dark] [style*="background-color:#f8d7da"] { background-color: #4a2a2a !important; }
html[data-bs-theme=dark] [style*="background:#f1edff"] { background-color: #2e264a !important; }
html[data-bs-theme=dark] [style*="background:#e7f7ef"] { background-color: #264a38 !important; }
html[data-bs-theme=dark] [style*="border-color:#fed7aa"] { border-color: #6b5233 !important; }
html[data-bs-theme=dark] [style*="border-color:#c9d6f5"] { border-color: #3d4d71 !important; }
html[data-bs-theme=dark] [style*="color:#c92a2a"] { color: #ef8a8a !important; }
html[data-bs-theme=dark] [style*="color:#9a3412"] { color: #f2a774 !important; }
html[data-bs-theme=dark] [style*="color:#333"], html[data-bs-theme=dark] [style*="color: #333"],
html[data-bs-theme=dark] [style*="color:#000"], html[data-bs-theme=dark] [style*="color: #000"],
html[data-bs-theme=dark] [style*="color:#212529"], html[data-bs-theme=dark] [style*="color:#14213d"] { color: var(--nx-ink) !important; }

/* Sertifika kâğıdı her temada basılı belge görünümünde kalır. */
html[data-bs-theme=dark] .cert-sheet, html[data-bs-theme=dark] .certificate-document { color-scheme: light; }

/* Tema anahtarı (üst çubuk) */
.nx-theme-toggle { align-items: center; display: inline-flex; justify-content: center; }
.nx-theme-toggle .nx-theme-icon { transition: transform .35s ease; }
html[data-bs-theme=dark] .nx-theme-toggle .nx-theme-icon { transform: rotate(-20deg); }
/* Giriş sayfalarının tema anahtarı ve logosu auth-modern.css içinde tanımlıdır. */

/* Kontrast ayarları: birincil renk beyaz yazıyla ve koyu zeminde okunur kalacak koyulukta. */
html[data-bs-theme=dark]:root { --management-primary: #5b7bd6; --management-primary-soft: #2a3352; }
html[data-bs-theme=dark] .lg-threat, html[data-bs-theme=dark] .lg-risk.high, html[data-bs-theme=dark] .lg-tab-badge { background: #c94444 !important; color: #fff !important; }
html[data-bs-theme=dark] .btn-outline-light { --bs-btn-color: #e4e3f1; --bs-btn-border-color: rgba(255, 255, 255, .4); --bs-btn-hover-bg: rgba(255, 255, 255, .12); --bs-btn-hover-color: #fff; color: #e4e3f1; border-color: rgba(255, 255, 255, .4); }
.lg-views { scrollbar-width: none; }
.lg-views::-webkit-scrollbar { display: none; }

/* Dosya yönetimi: işaretler ve tür etiketleri karanlık zeminde okunur kalsın. */
html[data-bs-theme=dark] .fm-check input:checked + span::after { border-color: #fff; }
html[data-bs-theme=dark] .fm-check input:indeterminate + span::after { background: #fff; }
html[data-bs-theme=dark] .fm-check span { border-color: #6b7090; }
html[data-bs-theme=dark] .fm-thumb .fm-ext { color: #1b1e2e; }
html[data-bs-theme=dark] .fm-toast { background: #3d4260; }

/* Kullanım kılavuzu: arama vurgusu karanlık zeminde. */
html[data-bs-theme=dark] .kb-hl { animation-name: kb-hl-dark; }
@keyframes kb-hl-dark { 0%, 30% { background: #60562f; } 100% { background: transparent; } }
html[data-bs-theme=dark] .kb-icon.lg { background: var(--ks); border: 1px solid color-mix(in srgb, var(--k) 35%, transparent); box-shadow: none; color: var(--k); }
html[data-bs-theme=dark] .kb-steps li:last-child::before { color: #1b1e2e; }
html[data-bs-theme=dark] .kb-hero { background: linear-gradient(135deg, #1a2350 0%, #233a85 50%, #43309a 100%); }
html[data-bs-theme=dark] .ma-steps li.is-active span { color: #fff; }
html[data-bs-theme=dark] .ma-wizard .ma-wz-num.is-done::after { border-color: #fff; }
html[data-bs-theme=dark] .ma-seg-btn[aria-checked="true"] .ma-seg-icon { color: #1b1e2e; }
html[data-bs-theme=dark] .sp .sp-msg.k-support { background: #1f3a32; border-left-color: #38b98a; }
html[data-bs-theme=dark] .sp .sp-msg.k-note { background: #3d3424; border-left-color: #d99a3c; }
html[data-bs-theme=dark] .sp .sp-pri button[aria-checked="true"].p-low { border-color: #8a93a6; color: #d6dae6; }
html[data-bs-theme=dark] .sp .sp-pri button[aria-checked="true"].p-normal { border-color: #819ce4; }
html[data-bs-theme=dark] .sp .sp-pri button[aria-checked="true"].p-high { border-color: #ecb579; }
html[data-bs-theme=dark] .asm.lc { --lc-open: #55689e; }
html[data-bs-theme=dark] .lc .lc-chips button[aria-pressed="true"] { color: #1b1e2e; }
html[data-bs-theme=dark] .lc .lc-nav .n.warn { color: #1b1e2e; }
html[data-bs-theme=dark] .lc button.lc-kpi:hover, html[data-bs-theme=dark] .lc .lc-plan:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
