/* Açık modda aktif menü: koyu moddaki gibi primary arka plan ve beyaz yazı */
[data-bs-theme=light] #layout-menu .menu-inner > .menu-item.active > .menu-link:not(.menu-toggle),
[data-bs-theme=light] #layout-menu .menu-item.active > .menu-link.menu-toggle {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* Proje genelinde dark tema renkleri: menü/kartlar #1a2537, içerik alanı #1f2a3d, yazı #fafafa */
[data-bs-theme=dark] {
    --bs-body-bg: #1f2a3d;
    --bs-body-bg-rgb: 31, 42, 61;
    --bs-paper-bg: #1a2537;
    --bs-paper-bg-rgb: 26, 37, 55;
    --bs-menu-bg: #1a2537;
    --bs-menu-bg-rgb: 26, 37, 55;
    --bs-body-color: #fafafa;
    --bs-body-color-rgb: 250, 250, 250;
    --bs-heading-color: #fafafa;
    --bs-emphasis-color: #fafafa;
    --bs-menu-color: #fafafa;
}

/* Dark modda sidebar yazı rengi */
[data-bs-theme=dark] #layout-menu .menu-link,
[data-bs-theme=dark] #layout-menu .menu-header .menu-header-text {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Dark modda menü bölüm ayırıcı çizgisi (sağdan soldan boşluklu) */
[data-bs-theme=dark] #layout-menu .menu-inner > .menu-header:not(:first-child) {
    background-image: linear-gradient(to right, transparent 0.75rem, rgba(255, 255, 255, 0.2) 0.75rem, rgba(255, 255, 255, 0.2) calc(100% - 0.75rem), transparent calc(100% - 0.75rem));
}

/* Sneat core [data-bs-theme=dark] .card ile --bs-card-bg: #2b2c40 veriyor; tüm kartlarda #1a2537 kullanılsın */
[data-bs-theme=dark] .card {
    --bs-card-bg: #1a2537;
    --bs-card-border-radius: 0.75rem;
    --bs-card-inner-border-radius: 0.75rem;
    background-color: #1a2537;
    border-radius: 0.75rem;
}

[data-bs-theme=dark] .card .card-body,
[data-bs-theme=dark] .card-body {
    background-color: #1a2537;
}

[data-bs-theme=dark] .card-header:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}
[data-bs-theme=dark] .card-footer:last-child {
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Proje genelinde kart köşe yuvarlaklığı (varsayılan 0.375rem yerine 0.75rem) */
.card {
    --bs-card-border-radius: 0.75rem;
    --bs-card-inner-border-radius: 0.75rem;
    border-radius: 0.75rem;
}
.card-header:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}
.card-footer:last-child {
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Navbar (layout-navbar) köşe yuvarlaklığı kartlarla aynı */
.layout-navbar.navbar-detached {
    border-radius: 0.75rem;
}

/* Fixed navbar'ın kart/içerik üstünde kalması (light/dark z-index çakışması önlenir) */
.layout-navbar-fixed .layout-content-navbar .layout-navbar {
    z-index: 1080 !important;
}

/* Ders Dokümanları tablosu: ana thead (DERS, Kategori, ...) ve iç tablo (DOSYA ADI, ...) dark mod - yüksek özgüllük */
html[data-bs-theme=dark] .content-wrapper .table-notes-nested thead.notes-table-header,
html[data-bs-theme=dark] .content-wrapper .table-notes-nested thead.notes-table-header th {
    background-color: #1a2537 !important;
    color: #fafafa !important;
    border-color: #334155 !important;
}
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-row td {
    background-color: #1f2a3d !important;
    color: #fafafa !important;
    border-color: #334155 !important;
}
/* İç tablo (DOSYA ADI, BOYUT, vb.) - course-notes-row td içindeki tablo */
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-notes-row td,
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-notes-row .table-notes-inner,
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-notes-row .table-notes-inner thead,
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-notes-row .table-notes-inner thead th,
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-notes-row .table-notes-inner tbody td {
    background-color: #1a2537 !important;
    color: #fafafa !important;
    border-color: #334155 !important;
}
html[data-bs-theme=dark] .content-wrapper .table-notes-nested .course-row:hover td {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
