.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}

/* Action Button Icon Styles */
.btn-xs {
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 3px;
    margin: 1px;
    min-width: 24px;
    text-align: center;
}

.btn-xs i {
    font-size: 11px;
    line-height: 1;
}

/* DataTable actions column styling */
.datatable td .btn-xs {
    display: inline-block;
    vertical-align: middle;
}

/* Notification Styles */
.notification-icon {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 3px 5px;
    border-radius: 50%;
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    line-height: 1;
    min-width: 15px;
    text-align: center;
}

.notification-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notification-drawer.open {
    right: 0;
}

.notification-drawer-header {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-drawer-header h5 {
    margin: 0;
}

.notification-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: flex-start;
    transition: background-color 0.2s;
    position: relative;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e8f4ff;
}

.notification-item.unread:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #007bff;
}

.notification-icon {
    margin-right: 15px;
    font-size: 1.2rem;
    padding-top: 3px;
    width: 30px;
    text-align: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.notification-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.notification-time {
    font-size: 0.75rem;
    color: #adb5bd;
    font-style: italic;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.notification-drawer-footer {
    padding: 10px 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.notification-drawer-footer .view-all {
    width: 100%;
    font-weight: 500;
}

.no-notifications {
    padding: 30px 15px;
    text-align: center;
    color: #6c757d;
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.notification-overlay.open {
    display: block;
}

/* Dual Scroll Bar for DataTables */
.dataTables_wrapper {
    position: relative;
}

.dataTables_dual_scroll_top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 20px;
    margin: 10px 0 8px 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    clear: both;
    position: sticky;
    top: 60px; /* Admin header altında ama sticky header'ların üstünde */
    z-index: 1025; /* Sticky header'ların üstünde olması için yüksek z-index */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.dataTables_dual_scroll_top::-webkit-scrollbar {
    height: 10px;
}

.dataTables_dual_scroll_top::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.dataTables_dual_scroll_top::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.dataTables_dual_scroll_top::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.dataTables_dual_scroll_content {
    height: 1px;
    background: transparent;
}

/* Hide default scrollbar when dual scroll is active */
.dataTables_wrapper.dual-scroll-active .dataTables_scrollBody {
    overflow-x: hidden !important;
}

/* Show scrollbar on hover for better UX */
.dataTables_wrapper.dual-scroll-active:hover .dataTables_scrollBody {
    overflow-x: auto !important;
}

/* CSS Sticky Header - Tüm DataTables için */
.dataTables_wrapper table.dataTable thead,
.dataTables_wrapper table[class*="datatable"] thead {
    position: sticky;
    top: 0px; /* Başlangıçta sayfanın üstünde */
    z-index: 1030; /* Dual scroll bar'ın üstünde olması için artırıldı */
    background-color: white;
    box-shadow: none;
    transition: all 0.2s ease;
}

/* Scroll edildiğinde pozisyon ve box-shadow değiştir */
.dataTables_wrapper table.dataTable thead.scrolled,
.dataTables_wrapper table[class*="datatable"] thead.scrolled {
    top: 85px; /* Scroll bar'ın altında (60px + 25px) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table[class*="datatable"] thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #c8ced3 !important;
    font-weight: 600;
    position: relative;
}

/* ScrollX ile oluşturulan scrollHead için */
.dataTables_wrapper .dataTables_scrollHead {
    position: sticky;
    top: 0px; /* Başlangıçta sayfanın üstünde */
    z-index: 1030; /* Dual scroll bar'ın üstünde olması için artırıldı */
    background-color: white;
    box-shadow: none;
    transition: all 0.2s ease;
}

/* Scroll edildiğinde pozisyon ve box-shadow değiştir */
.dataTables_wrapper .dataTables_scrollHead.scrolled {
    top: 85px; /* Scroll bar'ın altında (60px + 25px) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dataTables_wrapper .dataTables_scrollHead table {
    background-color: white;
    margin-bottom: 0;
}

.dataTables_wrapper .dataTables_scrollHead thead th {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #c8ced3 !important;
    font-weight: 600;
}

/* ScrollX aktif olduğunda sticky header düzeltmeleri */
.dataTables_wrapper .dataTables_scroll {
    position: relative;
}

.dataTables_wrapper .dataTables_scrollHead {
    border-bottom: 1px solid #dee2e6;
}

.dataTables_wrapper .dataTables_scrollBody {
    border-top: none;
}

/* Sticky header'da arama kutularının stilleri */
.dataTables_wrapper thead th input.search,
.dataTables_wrapper thead th select.search {
    background-color: white !important;
    border: 1px solid #ced4da !important;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

.dataTables_wrapper thead th input.search:focus,
.dataTables_wrapper thead th select.search:focus {
    border-color: #80bdff !important;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Daha güçlü sticky header CSS */
.card-body .dataTables_wrapper table.dataTable thead,
.card-body .dataTables_wrapper table[class*="datatable"] thead,
.card-body .dataTables_wrapper .dataTables_scrollHead {
    position: sticky !important;
    top: 0px !important; /* Başlangıçta sayfanın üstünde */
    z-index: 1030 !important; /* Dual scroll bar'ın üstünde olması için artırıldı */
    background-color: white !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

/* Scroll edildiğinde pozisyon ve box-shadow değiştir */
.card-body .dataTables_wrapper table.dataTable thead.scrolled,
.card-body .dataTables_wrapper table[class*="datatable"] thead.scrolled,
.card-body .dataTables_wrapper .dataTables_scrollHead.scrolled {
    top: 85px !important; /* Scroll bar'ın altında (60px + 25px) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Tablo container'ının overflow ayarları */
.card-body {
    overflow: visible !important;
}

.dataTables_wrapper {
    overflow: visible !important;
}

.dataTables_dual_scroll_top.sticky-active {
    background-color: white;
    border-color: #c8ced3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    margin-bottom: 12px;
}

/* Sticky scroll bar için daha iyi scrollbar stilleri */
.dataTables_dual_scroll_top.sticky-active::-webkit-scrollbar {
    height: 12px;
}

.dataTables_dual_scroll_top.sticky-active::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 6px;
}

.dataTables_dual_scroll_top.sticky-active::-webkit-scrollbar-thumb {
    background: #5f6368;
    border-radius: 6px;
}

.dataTables_dual_scroll_top.sticky-active::-webkit-scrollbar-thumb:hover {
    background: #3c4043;
}

/* Masaüstü monitörler için sticky header düzeltmesi */
@media (min-width: 1200px) {


    /* Dual scroll bar pozisyonunu ayarla */
    .dataTables_dual_scroll_top {
        top: 60px; /* Masaüstü için admin header altında */
    }

    /* Büyük monitörlerde scroll edildiğinde sticky header pozisyonu */
    .dataTables_wrapper table.dataTable thead.scrolled,
    .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .dataTables_wrapper .dataTables_scrollHead.scrolled,
    .card-body .dataTables_wrapper table.dataTable thead.scrolled,
    .card-body .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .card-body .dataTables_wrapper .dataTables_scrollHead.scrolled {
        top: 85px !important; /* Scroll bar'ın altında (60px + 25px) */
    }

    /* Related data tabloları için masaüstü pozisyonu */
    .tab-content .dataTables_wrapper table thead {
        top: 0px !important; /* Masaüstü için en üst pozisyon */
    }

    /* Masaüstünde related data tablolarının ilk satırını aşağıya almak için */
    .tab-content .dataTables_wrapper table tbody {
        margin-top: 35px;
    }

    /* Alternatif olarak tablo wrapper'ına padding ekle */
    .tab-content .dataTables_wrapper {
        padding-top: 35px;
    }

    /* İlk satır için özel padding */
    .tab-content .dataTables_wrapper table tbody tr:first-child {
        padding-top: 15px;
    }
}

/* Tablet ve mobil cihazlar için responsive düzeltmeler */
@media (max-width: 1199px) {
    /* Dual scroll bar pozisyonunu ayarla */
    .dataTables_dual_scroll_top {
        top: 70px; /* Tablet için admin header altında */
    }

    /* Tablet genişliğinde scroll edildiğinde sticky header pozisyonu */
    .dataTables_wrapper table.dataTable thead.scrolled,
    .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .dataTables_wrapper .dataTables_scrollHead.scrolled,
    .card-body .dataTables_wrapper table.dataTable thead.scrolled,
    .card-body .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .card-body .dataTables_wrapper .dataTables_scrollHead.scrolled {
        top: 95px !important; /* Scroll bar'ın altında (70px + 25px) */
    }

    /* Related data tablolarına minimum yükseklik ekle */
    .tab-content .tab-pane .card-body {
        min-height: 200px;
    }

    /* Tek kayıt için minimum tablo yüksekliği */
    .tab-content .dataTables_wrapper {
        min-height: 150px;
    }

    /* Tablet genişliğinde scroll body'ye minimum yükseklik */
    .dataTables_scrollBody {
        min-height: 100px !important;
    }

    /* Related data tabloları için tablet pozisyonu */
    .tab-content .dataTables_wrapper table thead {
        top: 95px !important; /* Scroll bar'ın altında */
    }

    /* Tablette masaüstü padding'lerini iptal et */
    .tab-content .dataTables_wrapper table tbody {
        margin-top: 0;
    }

    .tab-content .dataTables_wrapper {
        padding-top: 0;
    }

    .tab-content .dataTables_wrapper table tbody tr:first-child {
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .dataTables_dual_scroll_top {
        top: 65px; /* Mobil için admin header altında */
    }

    /* Mobil cihazlar için scroll edildiğinde sticky header pozisyonu */
    .dataTables_wrapper table.dataTable thead.scrolled,
    .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .dataTables_wrapper .dataTables_scrollHead.scrolled,
    .card-body .dataTables_wrapper table.dataTable thead.scrolled,
    .card-body .dataTables_wrapper table[class*="datatable"] thead.scrolled,
    .card-body .dataTables_wrapper .dataTables_scrollHead.scrolled {
        top: 90px !important; /* Scroll bar'ın altında (65px + 25px) */
    }

    /* Mobilde daha fazla minimum yükseklik */
    .tab-content .tab-pane .card-body {
        min-height: 250px;
    }

    .tab-content .dataTables_wrapper {
        min-height: 180px;
    }

    /* Related data tabloları için mobil pozisyonu */
    .tab-content .dataTables_wrapper table thead {
        top: 90px !important; /* Scroll bar'ın altında */
    }

    /* Mobilde masaüstü padding'lerini iptal et */
    .tab-content .dataTables_wrapper table tbody {
        margin-top: 0;
    }

    .tab-content .dataTables_wrapper {
        padding-top: 0;
    }

    .tab-content .dataTables_wrapper table tbody tr:first-child {
        padding-top: 0;
    }
}

/* Related data tab içerikleri için özel düzeltmeler */
.tab-content .tab-pane {
    padding-top: 15px;
}

/* Related data tablolarında sticky header özel kuralları */
.tab-content .dataTables_wrapper table thead {
    position: sticky !important;
    top: 0px !important; /* Related data tabloları için en üst pozisyon */
    z-index: 1030 !important; /* Dual scroll bar'ın üstünde olması için artırıldı */
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

/* Tek kayıt durumunda tablo görünürlüğünü artır */
.tab-content .dataTables_wrapper .dataTables_scrollBody table {
    min-height: 80px;
}

/* Tab içeriklerinin görünürlüğünü artır */
.tab-content .tab-pane.active {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* DataTable wrapper'ının overflow ayarları */
.tab-content .dataTables_wrapper {
    overflow: visible;
    position: relative;
}

/* Tablet genişliğinde tab navigation düzeltmeleri */
@media (max-width: 1199px) {
    .nav-tabs {
        flex-wrap: wrap;
    }

    .nav-tabs .nav-item {
        margin-bottom: 5px;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* Tek kayıt durumunda tablo satırının görünürlüğünü artır */
    .tab-content .dataTables_wrapper tbody tr {
        min-height: 45px;
    }

    .tab-content .dataTables_wrapper tbody td {
        padding: 12px 8px;
        vertical-align: middle;
    }

    /* Scroll body'nin minimum boyutunu garanti et */
    .tab-content .dataTables_scrollBody {
        min-height: 120px !important;
        overflow-y: visible !important;
    }

    /* Tablo container'ının pozisyonunu düzelt */
    .tab-content .table-responsive {
        min-height: 150px;
        overflow-x: auto;
        overflow-y: visible;
    }
}



/* Fixed header search input stilleri */
table.dataTable.fixedHeader-floating thead th input.search {
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Fixed header'da arama kutularının görünümü */
table.dataTable.fixedHeader-floating thead th input.search:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
