/* Eğitim Modülü - Ana CSS Stilleri */

/* Genel Stiller */
body {
    background-color: #f8f9fc;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Genel Font Boyutları */
h1, .h1 { font-size: 1.6rem; }
h2, .h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.1rem; }
h4, .h4 { font-size: 1rem; }
h5, .h5 { font-size: 0.9rem; }
h6, .h6 { font-size: 0.8rem; }

p { font-size: 0.8rem; }
small, .small { font-size: 0.7rem; }

/* Navbar Stilleri */
.navbar-brand {
    font-weight: 600;
    font-size: 1rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

/* Navbar menü öğelerinin sırasını garanti et - Desktop için */
@media (min-width: 992px) {
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .navbar-nav .nav-item {
        display: inline-block !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
}

/* Mobil için navbar düzenlemesi */
@media (max-width: 991.98px) {
    .navbar-nav {
        display: block !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .navbar-nav .nav-item {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.25rem !important;
    }

    .navbar-nav .nav-link {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        padding: 0.75rem 1rem !important;
    }
}

/* Raporlar ve Analizler menülerini başlangıçta gizli yap */
.nav-item[data-menu="raporlar"],
.nav-item[data-menu="analizler"] {
    display: none !important;
}

.nav-item[data-menu="raporlar"].show,
.nav-item[data-menu="analizler"].show {
    display: block !important;
}

/* Menü öğelerinin yükleme sırasını garanti et */
.navbar-nav .nav-item:nth-child(1) { order: 1 !important; }
.navbar-nav .nav-item:nth-child(2) { order: 2 !important; }
.navbar-nav .nav-item:nth-child(3) { order: 3 !important; }
.navbar-nav .nav-item:nth-child(4) { order: 4 !important; }
.navbar-nav .nav-item:nth-child(5) { order: 5 !important; }
.navbar-nav .nav-item:nth-child(6) { order: 6 !important; }
.navbar-nav .nav-item:nth-child(7) { order: 7 !important; }
.navbar-nav .nav-item:nth-child(8) { order: 8 !important; }

/* Kart Stilleri */
.card {
    border: 1px solid #e3e6f0;
    border-radius: 0.75rem;
    background-color: #fff;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
    font-size: 0.8rem;
}

/* İstatistik Kartları */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

/* Durum Raporu İstatistik Kartları - Yan Yana Düzenleme */
#genelIstatistikler {
    display: none !important; /* Başlangıçta gizli */
    flex-wrap: wrap !important;
    gap: 0.5rem !important; /* Boşluğu azalttım */
}

/* Rapor oluşturulduğunda görünür hale getir */
#genelIstatistikler.show {
    display: flex !important;
}

#genelIstatistikler .col-xl {
    flex: 0 0 auto !important;
    width: calc(20% - 0.4rem) !important; /* 5 kart için her biri %20, gap için düşürülmüş */
    max-width: none !important;
    margin-bottom: 0.5rem !important; /* Alt boşluğu da azalttım */
}

/* Responsive düzenleme */
@media (max-width: 1200px) {
    #genelIstatistikler .col-xl {
        width: calc(33.333333% - 0.33rem) !important; /* 3 kart yan yana */
    }
}

@media (max-width: 768px) {
    #genelIstatistikler .col-xl {
        width: calc(50% - 0.25rem) !important; /* 2 kart yan yana */
    }
}

@media (max-width: 576px) {
    #genelIstatistikler .col-xl {
        width: 100% !important; /* 1 kart alt alta */
    }
}

/* Kart Başlıkları */
.text-xs.font-weight-bold.text-uppercase {
    font-size: 0.75rem !important;
}

/* Sayfa Başlık Alanları */
.d-sm-flex.align-items-center.justify-content-between.mb-4 h1,
.d-flex.justify-content-between.align-items-center h1 {
    margin-bottom: 0.5rem !important;
}

.d-sm-flex.align-items-center.justify-content-between.mb-4 p,
.d-flex.justify-content-between.align-items-center p {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

/* Buton Stilleri */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* Form Stilleri */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid #d1d3e2;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
}

.form-control:focus {
    border-color: #4e73df;
    outline: none;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

.form-label {
    font-weight: 600;
    color: #5a5c69;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
}

/* Tablo Stilleri */
.table {
    background-color: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Topic Trainings Tablosu - Tüm Sütunları Ortala */
#topicTrainingsTable th,
#topicTrainingsTable td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Topic Trainings Sayfası - Tablo Hücrelerini Ortala */
#egitimlerTable th,
#egitimlerTable td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Topic Trainings Sayfası - Tüm Tabloları Ortala */
.table.text-center th,
.table.text-center td {
    text-align: center !important;
    vertical-align: middle !important;
}

.table thead th {
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
    font-weight: 600;
    color: #5a5c69;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody td {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

.table tbody tr {
    font-size: 0.8rem;
}

.table tbody tr:hover {
    background-color: #f8f9fc;
}

/* Badge Stilleri */
.badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
}

/* DataTables Özel Stilleri */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    font-size: 0.6rem !important;
    color: #5a5c69;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-size: 0.6rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* DataTables Sayfalama Butonları - Genel Stil */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid #e3e6f0 !important;
    background: #fff !important;
    color: #5a5c69 !important;
    margin: 0 0.05rem !important;
    border-radius: 0.25rem !important;
    transition: all 0.2s ease !important;
    font-size: 0.6rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f8f9fc !important;
    border-color: #4e73df !important;
    color: #4e73df !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4e73df !important;
    border-color: #4e73df !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: #f8f9fc !important;
    border-color: #e3e6f0 !important;
    color: #b7b9cc !important;
    cursor: not-allowed !important;
}

/* Toast Bildirimleri */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #fff;
    border: 1px solid #e3e6f0;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-header {
    background: #fff;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 0.75rem 1rem;
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
}

.toast-success {
    border-left: 4px solid #1cc88a;
}

.toast-error {
    border-left: 4px solid #e74a3b;
}

.toast-warning {
    border-left: 4px solid #f6c23e;
}

.toast-info {
    border-left: 4px solid #36b9cc;
}

/* Alert Stilleri (Eski - Kullanılmayacak) */
.alert {
    display: none;
}

/* Pagination Stilleri */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: none;
    color: #4e73df;
    padding: 0.75rem 1rem;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
}

.page-link:hover {
    background-color: #4e73df;
    color: #fff;
}

.page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Modal Stilleri */
.modal-content {
    border: 1px solid #e3e6f0;
    border-radius: 0.75rem;
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Dropdown Stilleri */
.dropdown-menu {
    border: 1px solid #e3e6f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fc;
}

/* Giriş Sayfası Stilleri */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Özel Sınıflar */
.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-xs {
    font-size: 0.55rem !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

/* Hover Efektleri */
.hover-lift:hover {
    background-color: #f8f9fc;
}

/* Özel Renkler */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #1cc88a 0%, #13855c 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #36b9cc 0%, #258391 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f6c23e 0%, #dda20a 100%);
}

/* Print Stilleri */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* DataTables Pagination Stilleri */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.page-link {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.active {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    font-size: 0.7rem !important;
    opacity: 0.6 !important;
}

/* DataTables Info ve Length Stilleri */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length {
    font-size: 0.75rem !important;
}

.dataTables_wrapper .dataTables_length select {
    font-size: 0.75rem !important;
    padding: 0.2rem 0.4rem !important;
}

/* DataTables Search Stilleri */
.dataTables_wrapper .dataTables_filter input {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* DataTables Length Selector Font Boyutu */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_length label {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.dataTables_wrapper .dataTables_length select {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.5rem !important;
    margin: 0 0.5rem !important;
    width: auto !important;
    min-width: 70px !important;
}

/* DataTables Info Font Boyutu */
.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

/* DataTables Filter Font Boyutu */
.dataTables_wrapper .dataTables_filter label {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.dataTables_wrapper .dataTables_filter input {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* Daha güçlü DataTables Pagination Stilleri - CSS Önceliği Artırıldı */
body .dataTables_wrapper .dataTables_paginate .paginate_button,
body .dataTables_wrapper .dataTables_paginate .paginate_button.page-link {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
    line-height: 1.2 !important;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.4rem !important;
}

body .dataTables_wrapper .dataTables_paginate .paginate_button.active {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
}

/* Bootstrap 5 DataTables uyumluluğu için ek stiller */
.pagination .page-link {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
}

/* DataTables özel sınıfları için ek stiller */
.dataTables_paginate ul.pagination li a {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
}

.dataTables_paginate ul.pagination li.paginate_button a {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
}

/* EN YÜKSEK ÖNCELİK - DataTables Pagination Override */
html body .dataTables_wrapper .dataTables_paginate .paginate_button,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.page-link,
html body .dataTables_wrapper .dataTables_paginate .paginate_button a {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
    line-height: 1.2 !important;
}

html body .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
}

html body .dataTables_wrapper .dataTables_paginate .paginate_button.active {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

/* Bootstrap 5 override */
html body .pagination .page-link {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* DataTables özel override */
html body .dataTables_paginate ul.pagination li a,
html body .dataTables_paginate ul.pagination li.paginate_button a {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* Inline style override için */
html body .dataTables_wrapper .dataTables_paginate .paginate_button[style*="font-size"] {
    font-size: 0.65rem !important;
}
