/* =========================================================
   MODERN ADMIN THEME OVERRIDE (BOOTSTRAP / LIMITLESS)
   ========================================================= */

/* 1. Genel Yapı ve Yazı Tipi */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background-color: #f1f5f9 !important; /* Ferah açık gri-mavi arkaplan */
    color: #334155 !important;
}

/* 2. Kartlar (Cards) - Soft gölgeler ve yuvarlak köşeler */
.card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 15px -5px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5, .card-header h6, .card-title {
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* 4. Sidebar (Yan Menü) */
.sidebar {
    background-color: #ffffff !important;
    border-right: none !important;
    box-shadow: 1px 0 10px rgba(0, 0, 0, 0.03) !important;
}

.nav-sidebar .nav-item {
    margin-bottom: 0.2rem;
}

.nav-sidebar .nav-link {
    border-radius: 8px !important;
    margin: 0 0.8rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.nav-sidebar .nav-link:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    transform: translateX(3px); /* Hoverda hafif sağa kayma efekti */
}

/* Aktif Menü Elemanı */
.nav-sidebar .nav-item-active > .nav-link,
.nav-sidebar .nav-link.active {
    background-color: #eff6ff !important;
    color: #2563eb !important;
}

.nav-sidebar .nav-item-active > .nav-link i,
.nav-sidebar .nav-link.active i {
    color: #2563eb !important;
}

/* 5. Butonlar (Buttons) */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1.2rem !important;
    text-transform: none !important; /* BÜYÜK HARF zorunluluğunu kaldırır */
    transition: all 0.2s ease !important;
}

.btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}

.btn-primary:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

/* 6. Form Elemanları (Inputs & Selects) */
.form-control, .custom-select {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.6rem 1rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) inset !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.form-control:focus, .custom-select:focus {
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* 7. Tablolar (Tables) */
.table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
}

.table td {
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

/* 8. Badge (Etiketler) */
.badge {
    border-radius: 6px !important;
    padding: 0.35em 0.65em !important;
    font-weight: 500 !important;
}
.badge-success { background-color: #10b981 !important; }
.badge-danger { background-color: #ef4444 !important; }
.badge-warning { background-color: #f59e0b !important; }
.badge-info { background-color: #3b82f6 !important; }

/* Navbar Genel Yapısı */
.navbar {
    padding: 0.5rem 1.25rem !important;
    background-color: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    z-index: 1050 !important;
}

/* Logo Alanı (Header) */
.navbar-header {
    background-color: #ffffff !important; /* Koyu renk header'ı beyaza çektik */
    border-right: 1px solid #f1f5f9 !important;
    padding-right: 1rem;
}

.navbar-brand img {
    max-height: 28px !important; /* Logoyu daha zarif hale getirir */
}

/* Navbar Sol Metin ve Badge */
.navbar-text {
    font-size: 0.85rem;
    color: #64748b !important;
}

.badge-pill {
    padding: 0.4em 0.8em !important;
    font-size: 85% !important;
    font-weight: 600 !important;
    border-radius: 6px !important; /* Tam yuvarlak yerine hafif köşeli modern yapı */
}

/* Navbar Linkleri (Dil ve Profil) */
.navbar-nav-link {
    color: #475569 !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
    padding: 0.6rem 1rem !important;
}

.navbar-nav-link:hover {
    background-color: #f8fafc !important;
    color: #2563eb !important;
}

/* Dropdown Menülerin Modernizasyonu */
.dropdown-menu {
    margin-top: 5px !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    padding: 8px !important;
    min-width: 180px !important;
}

.dropdown-item {
    padding: 0.6rem 1rem !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #eff6ff !important;
    color: #2563eb !important;
}

.dropdown-item.active {
    background-color: #2563eb !important;
    color: #fff !important;
}

.dropdown-divider {
    border-top: 1px solid #f1f5f9 !important;
    margin: 6px 0 !important;
}

/* Mobil Toggler İkonları */
.navbar-toggler {
    border: none !important;
    padding: 0.5rem !important;
    color: #64748b !important;
}

.navbar-toggler:hover {
    background-color: #f1f5f9 !important;
    border-radius: 6px !important;
}

/* Profil Resmi Küçültme ve Düzeltme */
.navbar-nav-link img.rounded-circle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e2e8f0;
}

/* Sidebar Ana Gövde */
.sidebar-dark {
    background-color: #1e293b !important; /* Standart siyah yerine modern Slate (gece mavisi) */
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Kullanıcı Profil Alanı */
.sidebar-user-material-body {
    background: linear-gradient(rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.9)),
                url('../images/user_bg3.jpg') center center no-repeat !important; /* Arkaplan resmini karartıp modernleştirdik */
    background-size: cover !important;
}

.sidebar-user-material .card-body img {
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.sidebar-user-material .card-body img:hover {
    transform: scale(1.05);
}

/* Menü Başlıkları (SEKMELER yazan kısım) */
.nav-item-header {
    padding: 1.25rem 1.25rem 0.5rem 1.25rem !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1rem !important;
    color: #94a3b8 !important; /* Başlıkları daha sönük ama okunur yaptık */
}

/* Menü Linkleri */
.nav-sidebar .nav-link {
    margin: 0.15rem 0.8rem !important; /* Linklerin etrafına boşluk bırakarak 'kutu' hissi verdik */
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    color: #cbd5e1 !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
}

/* Link Hover Durumu */
.nav-sidebar .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    transform: translateX(4px);
}

/* Aktif (Seçili) Menü */
.nav-sidebar .nav-item > .nav-link.active,
.nav-sidebar .nav-item-open > .nav-link {
    background-color: #3b82f6 !important; /* Modern canlı mavi */
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

/* İkonların Modernize Edilmesi */
.nav-sidebar .nav-link i {
    font-size: 1.1rem !important;
    margin-right: 1rem !important;
    opacity: 0.8;
}

.nav-sidebar .nav-link.active i {
    opacity: 1;
}

/* Sidebar Altındaki Kart Yapısını Temizleme */
.card-sidebar-mobile {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Mobil Menü Kapatma Tuşu Alanı */
.sidebar-mobile-toggler {
    background-color: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Page Header Alanı */
.page-header {
    background-color: transparent !important; /* Arkaplanı şeffaf yapıp body ile birleştiriyoruz */
    padding: 1.5rem 1.25rem 0 1.25rem !important;
    box-shadow: none !important;
    border: none !important;
}

.page-header-content {
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* Sayfa Başlığı (H4) */
.page-title {
    padding: 1rem 0 !important;
}

.page-title h4 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important; /* Koyu Slate rengi */
    display: flex;
    align-items: center;
    letter-spacing: -0.025em;
}

/* Başlıktaki İkon (Geri Oku) */
.page-title h4 i {
    font-size: 1rem !important;
    background-color: #ffffff;
    color: #64748b;
    padding: 10px;
    border-radius: 10px;
    margin-right: 1rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.page-title h4 i:hover {
    color: #2563eb;
    background-color: #eff6ff;
    border-color: #3b82f6;
}

/* "Dashboard" yazan font-weight-semibold kısmı */
.font-weight-semibold {
    font-weight: 600 !important;
}

/* Dashboard ibaresi yanındaki ek yazı ( - Dashboard kısmı) */
.page-title h4 span + b,
.page-title h4 {
    color: #64748b;
    font-weight: 400;
}

/* Header Elements (Sağ taraftaki butonlar veya araçlar varsa) */
.header-elements-md-inline .header-elements {
    padding: 0 !important;
    background-color: transparent !important;
    border: none !important;
}

/* Mobil Toggle Butonu */
.header-elements-toggle {
    color: #64748b !important;
    background-color: #fff !important;
    border-radius: 8px !important;
    padding: 5px !important;
}

/* Footer Ana Yapısı */
.navbar-light.navbar-expand-lg:last-child {
    background-color: transparent !important; /* Arkaplanı şeffaf yapıp body ile bütünleştiriyoruz */
    border: none !important;
    padding: 2rem 1.25rem !important; /* Biraz nefes alması için padding ekledik */
    box-shadow: none !important;
}

/* Footer Yazı Stili */
.navbar-text {
    font-size: 0.8rem !important;
    color: #94a3b8 !important; /* Hafif silik modern gri */
}

.navbar-text strong {
    font-weight: 500 !important;
    color: #64748b !important;
}

/* "Developed by" ve Link Alanı */
.navbar-nav.ml-lg-auto .navbar-text {
    display: flex;
    align-items: center;
    gap: 8px; /* Metin ve logo arasını açar */
}

.navbar-nav.ml-lg-auto a img {
    filter: grayscale(1) opacity(0.6); /* Logoyu biraz daha mütevazı yapar */
    transition: all 0.3s ease;
}

.navbar-nav.ml-lg-auto a:hover img {
    filter: grayscale(0) opacity(1); /* Üzerine gelince renklenir */
    transform: translateY(-1px);
}

/* Mobil Düzenleme */
@media (max-width: 991.98px) {
    .navbar-expand-lg:last-child {
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
    .navbar-nav.ml-lg-auto {
        margin-left: 0 !important;
        justify-content: center;
    }
}

/* 1. Tablo Genel Yapısı */
.table {
    border-collapse: separate !important;
    border-spacing: 0 5px !important; /* Satırlar arasına hafif boşluk */
    margin-top: -5px !important;
}

.table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
    font-weight: 700 !important;
}

.table tbody tr {
    transition: all 0.2s ease !important;
    background-color: #fff !important;
}

.table tbody tr:hover {
    background-color: #f1f5f9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.table td {
    padding: 1.25rem !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #475569 !important;
}

/* 2. Ön İzleme Görseli (Thumbnail) */
.table td img[height="100"] {
    height: 60px !important; /* Dev görseller yerine daha zarif bir boyuta çektik */
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.table td img[height="100"]:hover {
    transform: scale(2.5); /* Üzerine gelince büyüme efekti */
    z-index: 99;
    position: relative;
}

/* 3. İşlem Butonları (Göz ve İndir) */
.list-icons-item a {
    border-radius: 8px !important;
    margin: 0 3px !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    transition: all 0.2s ease !important;
}

.list-icons-item a:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    filter: brightness(1.1);
}

/* 4. Badge ve Etiketlerin Modernizasyonu */
.badge.bg-success {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #d1fae5 !important;
    font-weight: 600 !important;
}

.text-muted.font-size-sm .badge {
    padding: 0.2rem 0.5rem !important;
    border-radius: 4px !important;
}

/* 5. Dosya Tipi ve Boyut İkonları */
.table td span i.icon-arrow-resize7 {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* Dosya Boyutu Alanı */
.modern-size-label {
    color: #64748b !important; /* Slate gri tonu */
    font-size: 0.85rem;
}

.modern-size-label i {
    font-size: 0.9rem !important;
    color: #94a3b8; /* İkonu biraz daha soft yaptık */
}

/* Eğer KB/MB yazılarını biraz daha küçük ve estetik istersen */
.modern-size-label span {
    letter-spacing: 0.02em;
}

/* DataTables Arama Alanı Tasarımı */
.dataTables_filter {
    padding: 1.25rem;
    margin: 0 !important;
}

.dataTables_filter label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dataTables_filter input {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    background-color: #f8fafc !important;
    outline: none;
    width: 250px !important;
    transition: all 0.2s ease;
}

.dataTables_filter input:focus {
    border-color: #3b82f6 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Sayfalama ve Alt Kısım */
.datatable-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem;
    color: #64748b;
}

.dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    color: #fff !important;
    border-radius: 6px;
    border: none;
}

/* Çift arama kutusu oluşmasını engelle ve tasarımı düzelt */
.datatable-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem !important;
    margin-bottom: 0;
}

.dataTables_wrapper .datatable-header .dataTables_filter {
    padding: 0 !important;
}

.dataTables_wrapper .datatable-header .dataTables_length {
    margin: 0 !important;
}

/* Tablonun altındaki sayfalama alanı */
.datatable-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.25rem !important;
}
