:root {
    /* Ana Tema Renkleri (Turuncu & Siyah) */
    --primary-color: #FF6600;
    /* Vibrant Orange */
    --primary-hover: #E65C00;
    --primary-light: rgba(255, 102, 0, 0.1);

    /* Arka Planlar */
    --bg-body: #f4f7fb;
    /* Soft Gray for contrast with glass cards */
    --bg-sidebar: #ffffff;
    --border-color: #e9ecef;

    /* Metin Renkleri */
    --text-dark: #1A1A1A;
    --text-muted: #6B7280;
    --text-light: #ffffff;

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --card-radius: 24px;

    /* Fallback */
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 255, 102, 0;

    /* OTONOM MOBİL ODAKLI TEK FONT VE TEK ÖLÇÜ KANUNU DEĞİŞKENLERİ */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Mobil Odaklı Altın Oran Tek Ölçü (Tüm Arayüz Bu Ölçüyle Çalışır) */
    --font-size-base: clamp(0.8rem, 0.75rem + 0.15vw, 0.875rem); 

    /* Font Ağırlıkları */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-base: 1.5;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    background-color: var(--bg-body);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* 
   -------------------------------------------------------------------------
   MODERN DASHBOARD STYLES (Cards Only)
   ------------------------------------------------------------------------- 
*/

/* 
   -------------------------------------------------------------------------
   MODERN DASHBOARD STYLES (Cards Only)
   ------------------------------------------------------------------------- 
*/

.card-modern {
    background: #ffffff;
    /* Fallback */
    /* background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6)); Glass feel */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    /* Requested larger radius */
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Inner light border */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Gloss Overlay Element */
.gloss-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    opacity: 0.6;
}

.card-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.card-title-modern {
    font-size: var(--font-size-base) !important;
    color: var(--text-muted);
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
}

.card-value-modern {
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    letter-spacing: -0.2px;
}

/* 
   -------------------------------------------------------------------------
   SIDEBAR / LAYOUT STYLES (ORIGINAL PRESERVED)
   ------------------------------------------------------------------------- 
*/

#wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 260px;
    margin-left: 0;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: margin 0.25s ease-out;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    overflow-y: auto;
    /* Enable vertical scroll */
}

#page-content-wrapper {
    width: 100%;
    margin-left: 260px;
    transition: margin 0.25s ease-out;
    min-width: 0; /* Fix for flexbox overflow with wide tables */
}

#sidebar-wrapper a {
    text-decoration: none;
    color: var(--text-dark);
}

.sidebar-heading {
    padding: 1rem 0;
    /* Reduced padding for wider logo */
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-align: center;
}

.list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: var(--font-size-base) !important;
    color: var(--text-dark);
    background-color: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-group-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.list-group-item.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 4px solid var(--primary-color);
}

/* Sidebar Search */
.sidebar-search {
    padding: 0 1rem 1rem 1rem;
}

.sidebar-search input {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: var(--font-size-base) !important;
    border-radius: 8px;
    color: var(--text-dark);
}

.sidebar-search input::placeholder {
    color: #adb5bd;
}

/* Top Navbar */
.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 60px;
}

.page-title {
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -260px;
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

/* 
   -------------------------------------------------------------------------
   LOGIN PAGE STYLES 
   ------------------------------------------------------------------------- 
*/
.login-body {
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    background-color: #1a1a1a;
    min-height: 100vh;
}

.login-body::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: url('../img/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: blur(8px);
    z-index: -2;
}

.login-body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    color: white;
}

.vertical-divider {
    position: relative;
}

.vertical-divider::after {
    content: "";
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

.login-body .input-group-text {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
}

.login-body .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.8rem;
}

.login-body .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: none;
    border-bottom: 2px solid var(--primary-color);
}

.login-body .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-body .form-check-input {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-body .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s;
}

.btn-login:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 
   -------------------------------------------------------------------------
   MINI SIDEBAR (Collapsed Mode)
   ------------------------------------------------------------------------- 
*/

#wrapper.sidebar-mini #sidebar-wrapper {
    width: 80px;
}

#wrapper.sidebar-mini #page-content-wrapper {
    margin-left: 80px;
}

/* Hide specific containers */
#wrapper.sidebar-mini .sidebar-user-info,
#wrapper.sidebar-mini .sidebar-company-selector,
#wrapper.sidebar-mini #sidebar-logo {
    display: none !important;
}

/* Reduce heading padding since logo is hidden */
#wrapper.sidebar-mini .sidebar-heading {
    padding: 0.5rem 0;
    /* Minimal padding */
    height: 20px;
    /* Force small height or let it be 0 if empty? */
}

/* Hide text in links (relying on span text separation) */
#wrapper.sidebar-mini #sidebar-wrapper .list-group-item span {
    display: none;
}

/* Hide submenu arrow */
#wrapper.sidebar-mini #sidebar-wrapper .list-group-item .bi-chevron-down {
    display: none;
}

/* Adjust icons */
#wrapper.sidebar-mini #sidebar-wrapper .list-group-item {
    justify-content: center !important;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

/* Handle the inner div used for text/icon grouping in collapsible items */
#wrapper.sidebar-mini #sidebar-wrapper .list-group-item>div {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#wrapper.sidebar-mini #sidebar-wrapper .list-group-item i.fs-5 {
    margin-right: 0 !important;
    font-size: 1.5rem !important;
}

/* Submenu items - hide text specifically */
#wrapper.sidebar-mini #sidebar-wrapper .collapse .list-group-item {
    padding-left: 0 !important;
    justify-content: center;
}

#wrapper.sidebar-mini #sidebar-wrapper .collapse .list-group-item i {
    margin-right: 0 !important;
}

/* 
   -------------------------------------------------------------------------
   CUSTOM DASHBOARD GRID BREAKPOINTS
   900px  -> 2 Cols
   1250px -> 3 Cols
   1680px -> 5 Cols
   ------------------------------------------------------------------------- 
*/
@media (min-width: 900px) {
    .row-cols-custom>* {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (min-width: 1250px) {
    .row-cols-custom>* {
        flex: 0 0 auto;
        width: 33.33333333%;
    }
}

@media (min-width: 1680px) {
    .row-cols-custom>* {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* 
   -------------------------------------------------------------------------
   CLICKABLE DASHBOARD CARDS
   ------------------------------------------------------------------------- 
*/

/* Clickable Card Link Wrapper */
a.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Clickable Card Styles */
.card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.card-clickable:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

a.card-link:hover .card-clickable {
    opacity: 0.95;
}

/* Disabled Card (no link) */
.card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 
   -------------------------------------------------------------------------
   MOBİL ODAKLI TEK FONT VE TEK ÖLÇÜ KANUNU ENTEGRASYONU
   ------------------------------------------------------------------------- 
*/

/* Tüm Metinler, Başlıklar, Paragraflar ve Etiketler */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6, p, span, label, div, a, li {
    font-family: var(--font-sans) !important;
    font-size: var(--font-size-base) !important;
}

/* Farklılıklar Sadece Kalınlıklarla (Font-Weight) Sağlanır */
h1, .h1, h2, .h2, h3, .h3 {
    font-weight: var(--font-weight-bold) !important;
}

h4, .h4, h5, .h5, strong, th {
    font-weight: var(--font-weight-semibold) !important;
}

/* Otonom Title Case (Her Kelimenin Baş Harfi Büyük) */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6, 
.list-group-item, .page-title, th, td, 
.card-title-modern, .btn, .badge, .alert, label, .nav-link {
    text-transform: capitalize !important;
}

/* Tablolar ve Veri Gösterimleri (Asla Taşma Yapmaz, Mobilde Kusursuzdur) */
table, .table, .dataTables_wrapper, .dataTable, thead, tbody, tr, th, td {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
}

table th, .table th, .dataTable th {
    font-weight: var(--font-weight-semibold) !important;
}

/* Form Elemanları ve Seçiciler */
.form-control, .form-select, .input-group-text, select, input {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
}

/* 
   -------------------------------------------------------------------------
   BUTON STANDARDİZASYONU VE KONUMLANDIRMA KANUNU
   ------------------------------------------------------------------------- 
*/

/* 1. Export / Araç Butonları (Excel, CSV, Mail, Kolon Gösterimi) */
.btn-modern-export,
.dt-buttons .btn-info,
.dt-buttons .btn-light,
.dt-buttons .btn-secondary,
.detail-header-container .btn-info,
.detail-header-container .btn-light {
    background-color: transparent !important;
    border: 1.5px solid var(--primary-light) !important;
    color: var(--text-dark) !important;
    font-weight: var(--font-weight-medium) !important;
    padding: 0.35rem 0.9rem !important;
    border-radius: 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: var(--font-size-base) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.btn-modern-export:hover,
.dt-buttons .btn-info:hover,
.dt-buttons .btn-light:hover,
.dt-buttons .btn-secondary:hover,
.detail-header-container .btn-info:hover,
.detail-header-container .btn-light:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.15) !important;
}

/* 2. Aksiyon Butonları (Kaydet, Gönder, Güncelle vb.) */
.btn-modern-action {
    background-color: var(--primary-color) !important;
    border: 1.5px solid var(--primary-color) !important;
    color: var(--text-light) !important;
    font-weight: var(--font-weight-semibold) !important;
    padding: 0.35rem 1.1rem !important;
    border-radius: 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: var(--font-size-base) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 6px rgba(255, 102, 0, 0.1) !important;
}

.btn-modern-action:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: var(--text-light) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.25) !important;
}

/* 3. Bootstrap Buton Ezmeleri (Tüm Butonları Standardize Etmek İçin) */
.btn {
    font-size: var(--font-size-base) !important;
    border-radius: 20px !important;
    font-family: var(--font-sans) !important;
}

/* Badge ve Rozetler */
.badge {
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-medium) !important;
    padding: 0.35em 0.65em !important;
    border-radius: 8px !important;
}

/* 
   -------------------------------------------------------------------------
   OTONOM BUTON, PAGINATION VE TITLE CASE EZMELERİ (Tüm Sayfalar İçin)
   ------------------------------------------------------------------------- 
*/

/* 1. Otonom Title Case Ezmesi */
.text-uppercase, 
text-uppercase, 
th.text-uppercase, 
thead th {
    text-transform: capitalize !important;
}

/* 2. DataTables Buton Çubuğunun Genel Düzeni */
.dt-buttons, .dt-buttons.btn-group {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin: 0 !important;
    float: none !important;
    padding: 0 !important;
    overflow: visible !important;
    align-items: center !important;
    align-self: center !important;
}

/* dataTables_filter Arama Kutusu Simetrisi */
.dataTables_wrapper .dataTables_filter {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center !important;
}

/* dataTables_length Sayfalama Simetri */
.dataTables_wrapper .dataTables_length {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center !important;
    white-space: nowrap !important;
}

/* Buton Grubu Çizgi ve Border Çakışmalarını Sıfırlama (Resimdeki sol dikey çizgiyi kaldırır) */
html body .card-body .dataTables_wrapper .dt-buttons,
html body .card-body .dataTables_wrapper .dt-buttons.btn-group {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
html body .card-body .dataTables_wrapper .dt-buttons.btn-group > .btn,
html body .card-body .dataTables_wrapper .dt-buttons.btn-group > .btn-group {
    border-radius: 20px !important;
    border: 1.5px solid transparent !important;
}
html body .card-body .dataTables_wrapper .dt-buttons.btn-group > .btn-group:not(:first-child), 
html body .card-body .dataTables_wrapper .dt-buttons.btn-group > .btn:not(:first-child) {
    
    border-left: 1.5px solid transparent !important;
}

/* DataTables Butonlarını Genel Olarak Ezme (colvis butonları hariç) */
html body .card-body .dataTables_wrapper .dt-buttons .btn:not(.buttons-columnVisibility),
html body .card-body .dataTables_wrapper .dt-buttons button:not(.buttons-columnVisibility),
html body .card-body .dataTables_wrapper .dt-button:not(.buttons-columnVisibility),
.dataTables_wrapper .dt-buttons .btn:not(.buttons-columnVisibility),
.dataTables_wrapper .dt-buttons button:not(.buttons-columnVisibility),
.dt-buttons .btn:not(.buttons-columnVisibility),
.dt-button:not(.buttons-columnVisibility) {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
    border-radius: 20px !important;
    padding: 0.35rem 0.9rem !important;
    font-weight: var(--font-weight-medium) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 1.5px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    flex: none !important;
    width: auto !important;
    max-width: max-content !important;
    margin-right: 4px !important;
}

 /* DataTables Sayfalama Uzunluk Seçici */
html body .card-body .dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_length {
    display: inline-flex !important;
    align-items: center !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-dark) !important;
    padding-right: 1.5rem !important; /* Sağ taraftan yapışmayı ve "Kayıt Göster" yazısının kesilmesini önlemek için */
    margin-right: 0.5rem !important;
    white-space: nowrap !important; /* Metnin alt satıra kırılmasını veya kesilmesini önler */
    height: 32px !important; /* Butonlarla tam aynı yükseklik */
    align-self: center !important;
}

html body .card-body .dataTables_wrapper .dataTables_length select,
html body .card-body .dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input,
.dataTables_length select,
.dataTables_filter input {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
    border-radius: 20px !important;
    padding: 0.2rem 1.75rem 0.2rem 0.75rem !important; /* Dikey padding azaltıldı ki butonlarla simetrik olsun */
    border: 1.5px solid var(--border-color) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    height: 32px !important; /* Butonlarla birebir aynı yükseklik */
    display: inline-flex !important;
    align-items: center !important;
    background-color: #ffffff !important;
    margin: 0 4px !important;
    align-self: center !important;
    vertical-align: middle !important;
}

html body .card-body .dataTables_wrapper .dataTables_length select:focus,
html body .card-body .dataTables_wrapper .dataTables_filter input:focus,
.dataTables_length select:focus,
.dataTables_filter input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1) !important;
}

/* Hover'da Ortak Hafif Yükselme Efekti (Bypass Page-Level Styles) */
html body .card-body .dataTables_wrapper .dt-buttons .btn:hover,
html body .card-body .dataTables_wrapper .dt-buttons button:hover,
html body .card-body .dataTables_wrapper .dt-button:hover,
.dt-buttons .btn:hover, 
.dt-buttons button:hover,
.dt-button:hover {
    transform: translateY(-2px) !important;
}

/* 2.1. Barkod Filtreleme & Koyu Ton Ezmesi (Asla Siyah Buton Yok - Soft Premium Pastel Lavender) */
.dt-buttons .btn.btn-dark,
.dt-buttons .btn-dark,
.dt-buttons .btn.btn-barcode,
.dt-buttons .btn-barcode,
.btn-barcode {
    background-color: #F5F3FF !important;
    border-color: #DDD6FE !important;
    color: #6D28D9 !important;
    box-shadow: 0 2px 4px rgba(109, 40, 217, 0.05) !important;
}
.dt-buttons .btn.btn-dark:hover,
.dt-buttons .btn-dark:hover,
.dt-buttons .btn.btn-barcode:hover,
.dt-buttons .btn-barcode:hover,
.btn-barcode:hover {
    background-color: #EDE9FE !important;
    border-color: #C7D2FE !important;
    color: #5B21B6 !important;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.15) !important;
}

/* 2.2. Temizle (Soft Pastel Gül Kurusu / Mercan - Sarı Rengi Kullanmadığımız İçin Asla Sarı-Kırmızı Yan Yana Gelmez) */
.dt-buttons .btn.btn-danger,
.dt-buttons .btn-danger {
    background-color: #FFF5F5 !important;
    border-color: #FEB2B2 !important;
    color: #C53030 !important;
}
.dt-buttons .btn.btn-danger:hover,
.dt-buttons .btn-danger:hover {
    background-color: #FED7D7 !important;
    border-color: #FC8181 !important;
    color: #9B2C2C !important;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.15) !important;
}

/* 2.3. Kolon Görünürlüğü (Soft Pastel Mavi/Indigo) */
.dt-buttons .btn.btn-info,
.dt-buttons .btn-info,
.dt-buttons .buttons-colvis {
    background-color: #EBF8FF !important;
    border-color: #90CDF4 !important;
    color: #2B6CB0 !important;
}
.dt-buttons .btn.btn-info:hover,
.dt-buttons .btn-info:hover,
.dt-buttons .buttons-colvis:hover {
    background-color: #EBF8FF !important;
    border-color: #4299E1 !important;
    color: #2B6CB0 !important;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15) !important;
}

/* 2.4. Kolon Yapısını Kaydet (Soft Pastel Yeşil) */
.dt-buttons .btn.btn-success,
.dt-buttons .btn-success {
    background-color: #F0FFF4 !important;
    border-color: #9AE6B4 !important;
    color: #22543D !important;
}
.dt-buttons .btn.btn-success:hover,
.dt-buttons .btn-success:hover {
    background-color: #E6FFFA !important;
    border-color: #38A169 !important;
    color: #22543D !important;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.15) !important;
}

/* 2.5. CSV (Soft Gümüş/Gri) */
.dt-buttons .buttons-csv,
.dt-buttons .btn-light:has(.bi-filetype-csv) {
    background-color: #F7FAFC !important;
    border-color: #E2E8F0 !important;
    color: #4A5568 !important;
}
.dt-buttons .buttons-csv:hover,
.dt-buttons .btn-light:has(.bi-filetype-csv):hover {
    background-color: #EDF2F7 !important;
    border-color: #CBD5E0 !important;
    color: #2D3748 !important;
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.1) !important;
}

/* 2.6. Excel (Soft Pastel Mint Yeşili) */
.dt-buttons .buttons-excel,
.dt-buttons .btn-light:has(.bi-file-earmark-excel) {
    background-color: #E6FFFA !important;
    border-color: #B2F5EA !important;
    color: #00A389 !important;
}
.dt-buttons .buttons-excel:hover,
.dt-buttons .btn-light:has(.bi-file-earmark-excel):hover {
    background-color: #E6FFFA !important;
    border-color: #319795 !important;
    color: #007766 !important;
    box-shadow: 0 4px 12px rgba(49, 151, 149, 0.15) !important;
}

/* 2.7. Yazdır (Soft Pastel Turkuaz/Teal) */
.dt-buttons .btn.btn-primary,
.dt-buttons .btn-primary,
.dt-buttons .buttons-print {
    background-color: #E6FFFA !important;
    border-color: #81E6D9 !important;
    color: #2C7A7B !important;
}
.dt-buttons .btn.btn-primary:hover,
.dt-buttons .btn-primary:hover,
.dt-buttons .buttons-print:hover {
    background-color: #E6FFFA !important;
    border-color: #319795 !important;
    color: #234E52 !important;
    box-shadow: 0 4px 12px rgba(49, 151, 149, 0.15) !important;
}

/* 3. Sayfa Numaralandırma (Pagination) Standardizasyonu */
.pagination {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
}

.page-link, 
.pagination .page-link {
    color: #4A5568 !important; /* Koyu modern gri */
    background-color: #F7FAFC !important; /* Çok soft gri arka plan */
    border: none !important; /* Kenarlığı kaldırarak modernleştirdik */
    margin: 0 !important;
    padding: 8px 14px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    border-radius: 30px !important; /* Yuvarlak kapsül köşeler */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
}

/* Sayı butonları için özel yuvarlak yapı (Önceki/Sonraki hariç) */
.pagination .page-item:not(.previous):not(.next):not(.first):not(.last) .page-link {
    min-width: 36px !important;
    width: 36px !important;
    padding: 0 !important;
}

/* Aktif Sayfa */
.page-item.active .page-link, 
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #FF6600, #FF8000) !important; /* Degrade geçişli turuncu */
    color: #FFFFFF !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.25) !important;
}

/* Hover Efekti */
.page-link:hover, 
.pagination .page-link:hover {
    background-color: rgba(255, 102, 0, 0.08) !important; /* Soft turuncu hover */
    color: #FF6600 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05) !important;
}

/* Devre Dışı (Disabled) Durumu */
.page-item.disabled .page-link, 
.pagination .page-item.disabled .page-link {
    background-color: #EDF2F7 !important;
    color: #A0AEC0 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* 
   -------------------------------------------------------------------------
   MOBİL ODAKLI FORM, BUTON, ARAMA VE SAYFALAMA SİMETRİ YASASI
   ------------------------------------------------------------------------- 
*/

/* 1. Global Font-Size & Yazı Tipi Standardı (Uyumsuz Font Kalıntılarını Ezme) */
.form-control-sm,
.form-select-sm,
.btn-sm,
.form-control,
.form-select,
.btn,
.dropdown-toggle,
.dropdown-menu,
.form-label,
label.form-label,
#grandTotal,
#filteredTotal,
.fs-5,
.fs-6 {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
}

/* 2. Buton Yükseklik ve Padding Eşitleme Kanunu (Eşit ve Standart Oval Butonlar) */
.btn-modern-action,
#btnRefresh,
#btnFilterDate,
.dropdown-toggle,
.dt-buttons .btn,
.dt-buttons button {
    height: 36px !important; /* Standart premium dikey yükseklik */
    padding: 0.375rem 1.2rem !important;
    font-weight: var(--font-weight-medium) !important;
    border-radius: 20px !important; /* Oval modern görünüm */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* 3. Form Input ve Select Yükseklikleri */
.form-control-sm,
.form-select-sm,
#vadeTarihBaslangic,
#vadeTarihBitis,
input[type="date"],
select.form-select,
.dropdown-toggle {
    height: 36px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
}

/* Form Etiketleri (Form Label) */
.form-label,
label.form-label {
    font-weight: var(--font-weight-semibold) !important;
    color: var(--text-dark) !important;
    margin-bottom: 0.4rem !important;
    display: inline-block !important;
}

/* 4. Arama Kutusu (dataTables_filter) Sağa Taşmayı Önleme ve Simetrik Padding */
.dataTables_wrapper .dataTables_filter {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 16px 8px 4px !important; /* Sağ padding 16px ile kart sınırından içeriye çekildi */
    margin-bottom: 0.5rem !important;
    margin-right: 8px !important; /* Mükemmel sağ hizalama */
}

/* Arama Input Alanı Standardizasyonu */
.dataTables_wrapper .dataTables_filter input {
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
    border-radius: 20px !important;
    padding: 0.35rem 1rem !important; /* İçeriye tam ortalı dikey/yatay padding */
    border: 1.5px solid var(--border-color) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    height: 36px !important; /* Butonlarla birebir eşit yükseklik */
    display: inline-block !important;
    background-color: #ffffff !important;
    margin: 0 4px !important;
    max-width: 180px !important; /* Taşmayı önlemek için sınırlandırılmış akıllı genişlik */
    box-sizing: border-box !important;
}

/* 5. Alt Bilgi (Info) ve Sayfalama (Paginate) Butonları Dikey Simetrisi */
.dataTables_wrapper .dataTables_info {
    display: inline-flex !important;
    align-items: center !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-muted) !important;
    padding-top: 0 !important;
    height: 36px !important; /* Paginate butonları ile tam eşit yükseklik */
    margin: 0 !important;
    box-sizing: border-box !important;
}

.dataTables_wrapper .dataTables_paginate {
    display: inline-flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    margin: 0 !important;
    heig/* 
   -------------------------------------------------------------------------
   6. MASTER-DETAIL ALT DETAY TEMİZLİĞİ (PREMIUM SOFT BRAND AKORDU)
   ------------------------------------------------------------------------- 
*/
table.dataTable tbody tr.child,
table.dataTable tbody tr.detail-row {
    background-color: #FAF8F6 !important; /* Soft, warm gray background for details row */
}

table.dataTable tbody tr.child > td.child,
table.dataTable tbody tr.detail-row > td {
    background-color: #FAF8F6 !important;
    padding: 1.25rem 1.75rem !important; /* Generous breathing room */
    border-bottom: 2.5px solid #E2E8F0 !important;
    border-left: 5px solid var(--primary-color) !important; /* Brand orange left anchor line */
    box-sizing: border-box !important;
    position: relative !important;
}

/* Detay tablosu başlığı ve kolon ayarları için modern buton grupları */
.detail-col-toggle,
.detail-colvis-btn {
    border-radius: 20px !important;
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
    height: 30px !important; /* Detay içinde daha kibar ve modern dursun */
    padding: 0.2rem 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

/* Detay tablosunun kendisini modern bir çerçeveye alma (Havada asılı kalmasını önler) */
table.dataTable tbody tr.child table,
table.dataTable tbody tr.detail-row table,
.detail-container table,
.detail-container .table,
.detail-container table.dataTable {
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important; /* Premium yuvarlatılmış köşeler */
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    background-color: #ffffff !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
}

/* Detay tablolarındaki thead gri rengini modern çizgili soft turuncuya dönüştürme */
table.dataTable tbody tr.child table thead,
table.dataTable tbody tr.detail-row table thead,
.detail-container table thead {
    background-color: #FFF5F0 !important; /* Marka turuncusunun en soft pastel tonu */
    border-bottom: 2px solid #FFEDD5 !important;
}

table.dataTable tbody tr.child table thead tr,
table.dataTable tbody tr.detail-row table thead tr,
.detail-container table thead tr {
    background-color: transparent !important;
}

table.dataTable tbody tr.child table thead th,
table.dataTable tbody tr.detail-row table thead th,
.detail-container table thead th {
    background-color: transparent !important;
    color: var(--primary-color) !important; /* Başlıklar turuncu marka tonunda */
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    padding: 12px 16px !important;
    text-transform: capitalize !important; /* Başlıklar otomatik Title Case */
    border-bottom: 2px solid #FFEDD5 !important;
    border-top: none !important;
    letter-spacing: 0.3px;
}

/* Detay tablosunda zebra çizgilerini kaldırma ve satır hücrelerini düzenleme */
table.dataTable tbody tr.child table tbody tr,
table.dataTable tbody tr.detail-row table tbody tr,
.detail-container table tbody tr {
    background-color: #ffffff !important;
    transition: background-color 0.2s ease !important;
}

table.dataTable tbody tr.child table tbody tr:nth-child(even),
table.dataTable tbody tr.detail-row table tbody tr:nth-child(even),
.detail-container table tbody tr:nth-child(even) {
    background-color: #FCFBF9 !important; /* Soft zebra krem */
}

table.dataTable tbody tr.child table tbody td,
table.dataTable tbody tr.detail-row table tbody td,
.detail-container table tbody td {
    background-color: transparent !important;
    border-bottom: 1px solid #F1F5F9 !important;
    padding: 11px 16px !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-dark) !important;
}

/* Son satırın alt çizgisini kaldırma (Radius bozulmasın diye) */
table.dataTable tbody tr.child table tbody tr:last-child td,
table.dataTable tbody tr.detail-row table tbody tr:last-child td,
.detail-container table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Detay tablosunda hover efekti */
table.dataTable tbody tr.child table tbody tr:hover,
table.dataTable tbody tr.child table tbody tr:hover td,
table.dataTable tbody tr.detail-row table tbody tr:hover,
table.dataTable tbody tr.detail-row table tbody tr:hover td,
.detail-container table tbody tr:hover,
.detail-container table tbody tr:hover td {
    background-color: #FFF9F6 !important; /* Çok hafif tatlı turuncu hover parıltısı */
}

/* =========================================================================
   7. PREMIUM DETAY PANELI (DETAIL CONTAINER & TABLE) TASARIMI
   ========================================================================= */
.detail-container {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 20px !important; /* Yumuşak ve modern köşeler */
    padding: 1.25rem !important;
    margin: 10px 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

/* Detay Başlık Alanı */
.detail-header-container {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.detail-header-container h6 {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    text-transform: capitalize !important;
}

/* Detay Tablosu DataTables Süslemeleri */
.detail-container .dataTables_wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

/* Detay Altındaki DataTables Butonlarını Üst Tabloyla Tam Uyumlu Yapma */
.detail-container .dt-buttons {
    margin-bottom: 0 !important;
    padding: 0 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    height: 36px !important; /* Butonlarla birebir eşit yükseklik */
    display: inline-block !important;
    background-color: #ffffff !important;
    margin: 0 4px !important;
    max-width: 180px !important; /* Taşmayı önlemek için sınırlandırılmış akıllı genişlik */
    box-sizing: border-box !important;
}

/* 5. Alt Bilgi (Info) ve Sayfalama (Paginate) Butonları Dikey Simetrisi */
.dataTables_wrapper .dataTables_info {
    display: inline-flex !important;
    align-items: center !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-muted) !important;
    padding-top: 0 !important;
    height: 36px !important; /* Paginate butonları ile tam eşit yükseklik */
    margin: 0 !important;
    box-sizing: border-box !important;
}

.dataTables_wrapper .dataTables_paginate {
    display: inline-flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    margin: 0 !important;
    heig/* 
   -------------------------------------------------------------------------
   6. MASTER-DETAIL ALT DETAY TEMİZLİĞİ (PREMIUM SOFT BRAND AKORDU)
   ------------------------------------------------------------------------- 
*/
table.dataTable tbody tr.child,
table.dataTable tbody tr.detail-row {
    background-color: #FAF8F6 !important; /* Soft, warm gray background for details row */
}

table.dataTable tbody tr.child > td.child,
table.dataTable tbody tr.detail-row > td {
    background-color: #FAF8F6 !important;
    padding: 1.25rem 1.75rem !important; /* Generous breathing room */
    border-bottom: 2.5px solid #E2E8F0 !important;
    border-left: 5px solid var(--primary-color) !important; /* Brand orange left anchor line */
    box-sizing: border-box !important;
    position: relative !important;
}

/* Detay tablosu başlığı ve kolon ayarları için modern buton grupları */
.detail-col-toggle,
.detail-colvis-btn {
    border-radius: 20px !important;
    font-size: var(--font-size-base) !important;
    font-family: var(--font-sans) !important;
    height: 30px !important; /* Detay içinde daha kibar ve modern dursun */
    padding: 0.2rem 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

/* Detay tablosunun kendisini modern bir çerçeveye alma (Havada asılı kalmasını önler) */
table.dataTable tbody tr.child table,
table.dataTable tbody tr.detail-row table,
.detail-container table,
.detail-container .table,
.detail-container table.dataTable {
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important; /* Premium yuvarlatılmış köşeler */
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    background-color: #ffffff !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin-bottom: 0 !important;
}

/* Detay tablolarındaki thead gri rengini modern çizgili soft turuncuya dönüştürme */
table.dataTable tbody tr.child table thead,
table.dataTable tbody tr.detail-row table thead,
.detail-container table thead {
    background-color: #FFF5F0 !important; /* Marka turuncusunun en soft pastel tonu */
    border-bottom: 2px solid #FFEDD5 !important;
}

table.dataTable tbody tr.child table thead tr,
table.dataTable tbody tr.detail-row table thead tr,
.detail-container table thead tr {
    background-color: transparent !important;
}

table.dataTable tbody tr.child table thead th,
table.dataTable tbody tr.detail-row table thead th,
.detail-container table thead th {
    background-color: transparent !important;
    color: var(--primary-color) !important; /* Başlıklar turuncu marka tonunda */
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    padding: 12px 16px !important;
    text-transform: capitalize !important; /* Başlıklar otomatik Title Case */
    border-bottom: 2px solid #FFEDD5 !important;
    border-top: none !important;
    letter-spacing: 0.3px;
}

/* Detay tablosunda zebra çizgilerini kaldırma ve satır hücrelerini düzenleme */
table.dataTable tbody tr.child table tbody tr,
table.dataTable tbody tr.detail-row table tbody tr,
.detail-container table tbody tr {
    background-color: #ffffff !important;
    transition: background-color 0.2s ease !important;
}

table.dataTable tbody tr.child table tbody tr:nth-child(even),
table.dataTable tbody tr.detail-row table tbody tr:nth-child(even),
.detail-container table tbody tr:nth-child(even) {
    background-color: #FCFBF9 !important; /* Soft zebra krem */
}

table.dataTable tbody tr.child table tbody td,
table.dataTable tbody tr.detail-row table tbody td,
.detail-container table tbody td {
    background-color: transparent !important;
    border-bottom: 1px solid #F1F5F9 !important;
    padding: 11px 16px !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-dark) !important;
}

/* Son satırın alt çizgisini kaldırma (Radius bozulmasın diye) */
table.dataTable tbody tr.child table tbody tr:last-child td,
table.dataTable tbody tr.detail-row table tbody tr:last-child td,
.detail-container table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Detay tablosunda hover efekti */
table.dataTable tbody tr.child table tbody tr:hover,
table.dataTable tbody tr.child table tbody tr:hover td,
table.dataTable tbody tr.detail-row table tbody tr:hover,
table.dataTable tbody tr.detail-row table tbody tr:hover td,
.detail-container table tbody tr:hover,
.detail-container table tbody tr:hover td {
    background-color: #FFF9F6 !important; /* Çok hafif tatlı turuncu hover parıltısı */
}

/* =========================================================================
   7. PREMIUM DETAY PANELI (DETAIL CONTAINER & TABLE) TASARIMI
   ========================================================================= */
.detail-container {
    background-color: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 20px !important; /* Yumuşak ve modern köşeler */
    padding: 1.25rem !important;
    margin: 10px 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

/* Detay Başlık Alanı */
.detail-header-container {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.detail-header-container h6 {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
    text-transform: capitalize !important;
}

/* Detay Tablosu DataTables Süslemeleri */
.detail-container .dataTables_wrapper {
    padding: 0 !important;
    margin: 0 !important;
}

/* Detay Altındaki DataTables Butonlarını Üst Tabloyla Tam Uyumlu Yapma */
.detail-container .dt-buttons {
    margin-bottom: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    gap: 6px !important;
}

.detail-container .dt-buttons .btn {
    height: 30px !important; /* Detay içinde daha kibar butonlar */
    font-size: var(--font-size-base) !important;
    padding: 0.2rem 0.8rem !important;
    border-radius: 20px !important;
}

.detail-loading {
    background-color: #FAF8F6 !important;
    border-left: 5px solid var(--primary-color) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
}

.detail-container table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Detay Tablosu Satır Hover Efekti */
.detail-container table tbody tr:hover,
.detail-container table tbody tr:hover td {
    background-color: #FFF9F6 !important; /* Çok hafif tatlı turuncu hover parıltısı */
}

/* ==========================================================================
   Colvis (Kolon Görünürlüğü) Menü ve Buton Tasarımı
   ==========================================================================
   HTML yapısı:
     <div class="dropdown-menu dt-button-collection">
       <a class="dt-button dropdown-item buttons-columnVisibility [dt-button-active]">Kolon Adı</a>
     </div>
   Aktif kolon → dt-button-active sınıfı VAR
   Pasif kolon → dt-button-active sınıfı YOK (JS tarafı column-hidden ekler)
   ========================================================================== */

/* ── KÜTÜPHANENİN VARSAYILAN KURALLARI SIFIRLANIYOR ── */
/* buttons.bootstrap5.min.css: .dt-button-active { padding-right:3em } ve ::after { content:"✓" } */
div.dt-button-collection .dt-button-active,
div.dt-button-collection a.dt-button-active {
    padding-right: 0.9rem !important;
}
div.dt-button-collection .dt-button-active:after,
div.dt-button-collection a.dt-button-active:after,
div.dt-button-collection .dropdown-item.active:after,
div.dt-button-collection a.dropdown-item.active:after,
div.dt-button-collection .buttons-columnVisibility:after,
div.dt-button-collection .buttons-columnVisibility span:after,
div.dt-button-collection .dt-button-active::after,
div.dt-button-collection a.dt-button-active::after,
div.dt-button-collection .dropdown-item.active::after,
div.dt-button-collection a.dropdown-item.active::after,
div.dt-button-collection .buttons-columnVisibility::after,
div.dt-button-collection .buttons-columnVisibility span::after {
    content: "" !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    font-size: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* ── Dropdown Container ── */
div.dt-button-collection.dropdown-menu {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,102,0,0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 35px rgba(0,0,0,0.12) !important;
    padding: 10px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 6px !important;
    max-width: 620px !important;
    z-index: 1100 !important;
    min-width: 200px !important;
}

/* ── Colvis Buton Temel Stili ── */
div.dt-button-collection a.buttons-columnVisibility,
div.dt-button-collection .buttons-columnVisibility {
    background-color: #F7FAFC !important;
    border: 1.5px solid #CBD5E0 !important;
    color: #4A5568 !important;
    border-radius: 20px !important;
    padding: 0.4rem 0.9rem 0.4rem 2.3rem !important;
    font-size: var(--font-size-base) !important;
    font-weight: 500 !important;
    position: relative !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* ── Kolon adının span'ı ── */
div.dt-button-collection a.buttons-columnVisibility span,
div.dt-button-collection .buttons-columnVisibility span,
div.dt-button-collection button.buttons-columnVisibility span {
    display: inline-block !important;
    white-space: normal !important;
    overflow: visible !important;
    max-width: none !important;
    word-break: break-word !important;
}

/* ── Pseudo-ikon solda sabit konumda ── */
div.dt-button-collection a.buttons-columnVisibility::before,
div.dt-button-collection .buttons-columnVisibility::before {
    font-family: "bootstrap-icons" !important;
    position: absolute !important;
    left: 9px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    display: block !important;
}

/* ── AKTİF: dt-button-active sınıfı (DataTables tarafından atanır) ── */
div.dt-button-collection a.buttons-columnVisibility.dt-button-active,
div.dt-button-collection .buttons-columnVisibility.dt-button-active,
div.dt-button-collection a.buttons-columnVisibility.column-visible,
div.dt-button-collection .buttons-columnVisibility.column-visible {
    background-color: #E6FFFA !important;
    border-color: #38A169 !important;
    color: #22543D !important;
}

div.dt-button-collection a.buttons-columnVisibility.dt-button-active::before,
div.dt-button-collection .buttons-columnVisibility.dt-button-active::before,
div.dt-button-collection a.buttons-columnVisibility.column-visible::before,
div.dt-button-collection .buttons-columnVisibility.column-visible::before {
    content: "\F272" !important; /* bi-check-lg */
    color: #276749 !important;
}

/* ── PASİF: column-hidden sınıfı (JS tarafından atanır) ── */
div.dt-button-collection a.buttons-columnVisibility.column-hidden,
div.dt-button-collection .buttons-columnVisibility.column-hidden {
    background-color: #FFF5F5 !important;
    border-color: #E53E3E !important;
    color: #9B2C2C !important;
}

div.dt-button-collection a.buttons-columnVisibility.column-hidden::before,
div.dt-button-collection .buttons-columnVisibility.column-hidden::before {
    content: "\F659" !important; /* bi-x-lg */
    color: #E53E3E !important;
}

/* ── PASİF fallback: hiç sınıf yoksa ── */
div.dt-button-collection a.buttons-columnVisibility:not(.dt-button-active):not(.column-visible):not(.column-hidden),
div.dt-button-collection .buttons-columnVisibility:not(.dt-button-active):not(.column-visible):not(.column-hidden) {
    background-color: #FFF5F5 !important;
    border-color: #E53E3E !important;
    color: #9B2C2C !important;
}

div.dt-button-collection a.buttons-columnVisibility:not(.dt-button-active):not(.column-visible):not(.column-hidden)::before,
div.dt-button-collection .buttons-columnVisibility:not(.dt-button-active):not(.column-visible):not(.column-hidden)::before {
    content: "\F659" !important;
    color: #E53E3E !important;
}

/* ── Hover ── */
div.dt-button-collection a.buttons-columnVisibility:hover,
div.dt-button-collection .buttons-columnVisibility:hover {
    filter: brightness(0.95) !important;
    transform: translateY(-1px) !important;
}

/* ══════════════════════════════════════════════════════════
   FİLTRE FORMU STANDARİZASYONU - Tüm Sayfalarda Simetrik
   ══════════════════════════════════════════════════════════
   Sorun: col-md-3 sütunlar tam ekran genişliğinde gereksiz
   yayılıyor. Çözüm: auto genişlik + maks sınır.
   ====================================================== */

/* Filtre satırı hizası */
#filterForm .row {
    align-items: flex-end !important;
    flex-wrap: wrap !important;
}

/* Her filtre sütunu yalnızca içeriği kadar yer kaplasın */
#filterForm .row > [class*="col-"] {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 260px !important;
    min-width: 130px !important;
}

/* ──────────────────────────────────────────────
   TÜM FİLTRE ELEMANLARI SİMETRİK YÜKSEKLİK
   form-control-sm ile aynı boyut: h=31px
   ────────────────────────────────────────────── */
#filterForm .form-control,
#filterForm .form-control-sm,
#filterForm .form-select,
#filterForm .form-select-sm,
#filterForm input[type="date"],
#filterForm input[type="text"],
#filterForm input[type="number"] {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: var(--font-size-base) !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    border-radius: 0.375rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

/* Şube dropdown butonu: aynı yükseklik */
#filterForm .dropdown-toggle,
#filterForm .btn-outline-secondary {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: var(--font-size-base) !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    border-radius: 0.375rem !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
}

/* Yenile submit butonu: aynı yükseklik, kompakt */
#filterForm button[type="submit"],
#filterForm input[type="submit"] {
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    font-size: var(--font-size-base) !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border-radius: 0.375rem !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 90px !important;
    max-width: 140px !important;
    box-sizing: border-box !important;
}

/* Label: tek satır, küçük, tutarlı */
#filterForm label.form-label {
    font-size: var(--font-size-base) !important;
    margin-bottom: 0.25rem !important;
    display: block !important;
}

/* Mobil: tam genişliğe geri dön */
@media (max-width: 575.98px) {
    #filterForm .row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    #filterForm .row > [class*="col-"] input[type="date"],
    #filterForm .row > [class*="col-"] input[type="text"],
    #filterForm .row > [class*="col-"] button[type="submit"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* ==============================================
   TOGGLE SWITCH - Turuncu Tema
   ============================================== */
.form-check-input[role="switch"]:checked {
    background-color: #FF6600 !important;
    border-color: #FF6600 !important;
}
.form-check-input[role="switch"]:focus {
    box-shadow: 0 0 0 0.15rem rgba(255,102,0,0.25) !important;
    border-color: #FF6600 !important;
}
.form-check-input[role="switch"]:not(:checked) {
    background-color: #dee2e6;
    border-color: #dee2e6;
}

/* ==============================================
   DATATABLES CUSTOM GRID & BUTTONS (PREMIUM)
   ============================================== */
.custom-dt-buttons .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.custom-dt-buttons .dt-buttons .btn {
    flex: 1 1 auto;
    justify-content: center;
    border-radius: 8px !important;
    padding: 0.4rem 1rem !important;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.custom-dt-buttons .dt-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

@media (max-width: 768px) {
    .custom-dt-buttons .dt-buttons .btn {
        flex: 1 1 calc(50% - 0.5rem); /* Mobilde 2'li grid */
        margin: 0 !important;
    }
}


/* 
   -------------------------------------------------------------------------
   PREMIUM SIDEBAR VE HEADER TASARIMI (v2)
   ------------------------------------------------------------------------- 
*/
:root {
  --sidebar-bg: #0F172A; /* Premium Dark Navy */
  --sidebar-text: #94A3B8;
  --sidebar-hover-bg: rgba(255, 102, 0, 0.1); 
  --sidebar-hover-text: #FF6600; /* Doğru Bilişim Turuncusu */
  --sidebar-border: #1E293B;
  --header-bg: rgba(255, 255, 255, 0.85);
}

#sidebar-wrapper {
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
}

/* Scrollbar styling for sidebar */
#sidebar-wrapper::-webkit-scrollbar {
    width: 6px;
}
#sidebar-wrapper::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 10px;
}

#sidebar-wrapper .sidebar-heading {
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1.5rem;
    margin-bottom: 0.5rem;
}

#sidebar-wrapper .list-group-item {
    color: var(--sidebar-text) !important;
    background-color: transparent !important;
    margin: 4px 16px;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
}

#sidebar-wrapper .list-group-item i {
    font-size: 1.25rem !important;
    margin-right: 12px !important;
    transition: color 0.3s;
}

/* Hover Efekti */
#sidebar-wrapper .list-group-item:not(.active):hover {
    background-color: var(--sidebar-hover-bg) !important;
    color: var(--sidebar-hover-text) !important;
    transform: translateX(4px);
}
#sidebar-wrapper .list-group-item:not(.active):hover i {
    color: var(--sidebar-hover-text) !important;
}

/* Aktif Sekme */
#sidebar-wrapper .list-group-item.active {
    background: linear-gradient(135deg, #FF6600, #E65C00) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    font-weight: 600;
}
#sidebar-wrapper .list-group-item.active i {
    color: #ffffff !important;
}

/* Alt menüler (Collapse) */
#sidebar-wrapper .collapse .list-group-item {
    margin: 2px 16px 2px 36px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem !important;
}

/* Arama Kutusu Dark Mode Adaptasyonu */
.sidebar-search input {
    background-color: #1E293B !important;
    border: 1px solid #334155 !important;
    color: #F8FAFC !important;
}
.sidebar-search input::placeholder {
    color: #64748B !important;
}
.sidebar-search input:focus {
    border-color: #FF6600 !important;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15) !important;
}

/* Header Premium */
.top-navbar {
    background-color: var(--header-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    box-shadow: 0 4px 20px -10px rgba(0,0,0,0.05);
}

.company-badge-modern {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.1rem 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: all 0.3s;
}
.company-badge-modern:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-color: #FF6600;
}

/* Avatar Glassmorphism */
.user-avatar-premium {
    width: 42px; 
    height: 42px;
    background: linear-gradient(135deg, rgba(255,102,0,0.15), rgba(255,102,0,0.05));
    border: 1px solid rgba(255,102,0,0.2);
    border-radius: 12px; /* modern squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255,102,0,0.1);
    transition: all 0.3s;
}
.dropdown-toggle:hover .user-avatar-premium {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,102,0,0.2);
    background: linear-gradient(135deg, rgba(255,102,0,0.2), rgba(255,102,0,0.1));
}
