/* ================================================================= */
/* APAYDIN METAL - GENEL PANEL & RAPOR YAZDIRMA STİLLERİ             */
/* Dosya Yolu: public_html/apaydinqr/assets/css/style.css             */
/* ================================================================= */

/* ----------------------------------------------------------------- */
/* 0. APP SHELL KESİN EKRAN VE FOOTER SABİTLEME MİMARİSİ             */
/* ----------------------------------------------------------------- */
html, body {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    background-color: #050505 !important;
    color: #f1f5f9 !important;
    padding-bottom: 0 !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Üst Kısım (Header) Sabit */
body > .container-fluid:first-of-type {
    flex: 0 0 auto !important;
}

/* Orta Kaydırılabilir Tablo Alanı (Sadece burası kayar) */
body > .container-fluid.flex-grow-1 {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
}

/* Alt Kısım (Footer) Kusursuz Sabitleme */
footer, footer.no-print {
    flex: 0 0 auto !important;
    width: 100% !important;
}

/* ----------------------------------------------------------------- */
/* 1. EKRAN GÖRÜNÜMÜ - TRUE DARK PANEL TEMASI                         */
/* ----------------------------------------------------------------- */
.card { 
    background-color: #121212 !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
    margin-bottom: 15px !important;
}

.form-control, .form-select { 
    background-color: #1a1a1a !important; 
    color: #f1f5f9 !important; 
    border: 1px solid rgba(255, 255, 255, 0.15) !important; 
}

.form-control:focus, .form-select:focus { 
    background-color: #1a1a1a !important; 
    color: #f1f5f9 !important; 
    border-color: #0d6efd !important; 
    box-shadow: none !important; 
}

.modal-content { 
    background-color: #121212 !important; 
    color: #fff !important; 
    border: 1px solid #27272a !important; 
}

/* DARALTILMIŞ COMPACT TRUE DARK TABLO STİLİ (Sabit Sütun Yapısı) */
.table-custom-dark { 
    --bs-table-bg: transparent !important; 
    --bs-table-color: #f1f5f9 !important; 
    color: #f1f5f9 !important; 
    margin-bottom: 0 !important; 
    width: 100%;
    table-layout: fixed !important;
}

.table-custom-dark th, 
.table-custom-dark td { 
    padding: 8px 12px !important; 
    font-size: 0.85rem !important; 
    vertical-align: middle !important;
    line-height: 1.3 !important;
}

/* Sütun Hizalama Sınıfları */
.table-custom-dark .text-left { text-align: left !important; padding-left: 15px !important; }
.table-custom-dark .text-center { text-align: center !important; }
.table-custom-dark .text-right { text-align: right !important; padding-right: 15px !important; }

.table-custom-dark thead th { 
    background-color: #0d0d0d !important; 
    color: #ffffff !important; 
    border-bottom: 1px solid #27272a !important; 
    font-weight: 600;
}

.table-custom-dark tbody tr:nth-of-type(even) td { background-color: #121212 !important; border-bottom: 1px solid #1f1f23 !important; }
.table-custom-dark tbody tr:nth-of-type(odd) td { background-color: #18181b !important; border-bottom: 1px solid #1f1f23 !important; }
.table-custom-dark tbody tr:hover td { background-color: #27272a !important; color: #ffffff !important; }

/* HENÜZ ÇIKIŞ YAPILMADI YAZISI HOVER AYARI */
.table-custom-dark tbody tr td.text-muted.fst-italic {
    color: #888888 !important; 
    transition: all 0.2s ease-in-out !important;
}

.table-custom-dark tbody tr:hover td.text-muted.fst-italic,
.table-custom-dark tbody tr td.text-muted.fst-italic:hover {
    color: #ffffff !important; 
    opacity: 1 !important;
    font-weight: 500 !important;
}

/* KUTULU DİL MENÜSÜ */
.lang-switch-box {
    border: 1px solid #ffc107 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    display: inline-flex !important;
}

.lang-switch-box a {
    padding: 4px 10px !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
}

.lang-switch-box a.active {
    background-color: #ffc107 !important;
    color: #000000 !important;
    font-weight: 700 !important;
}

.lang-switch-box a:not(.active) {
    background-color: #000000 !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
}

/* AUTOFILL MAVİ ARKA PLAN DÜZELTME */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

::placeholder {
    color: #8e8e93 !important;
    opacity: 0.7 !important;
}

/* ----------------------------------------------------------------- */
/* 2. RAPOR VE YAZDIRMA (PDF / A4) DÜZENİ                            */
/* ----------------------------------------------------------------- */
.rapor-tablo {  
    border-collapse: collapse;  
    width: 100%;  
    table-layout: fixed; 
}

.rapor-tablo th,  
.rapor-tablo td {  
    border: 1px solid #000000 !important;  
    padding: 3px 5px !important;  
    font-size: 10.5px;  
    word-wrap: break-word;  
    vertical-align: middle;
    line-height: 1.2 !important;  
}

.rapor-tablo thead th {  
    background-color: #f2f2f2 !important;  
    color: #000000 !important;  
    font-weight: bold;
}

.col-personel     { width: 20%; } 
.col-kullanici    { width: 14%; } 
.col-tarih        { width: 13%; } 
.col-giris        { width: 10%; } 
.col-cikis        { width: 10%; } 
.col-saat-ucreti  { width: 16%; } 
.col-toplam-ucret { width: 17%; } 

/* ----------------------------------------------------------------- */
/* 3. @MEDIA PRINT (YAZICI / PDF İÇİN EKRAN-BEYAZ DÖNÜŞÜMÜ)          */
/* ----------------------------------------------------------------- */
@page {
    size: A4 portrait; 
    margin: 10mm;      
}

@media print {  
    .no-print,
    .btn,
    nav,
    .dropdown,
    footer,
    .lang-switch-box {  
        display: none !important;  
    }  

    body {  
        background-color: #ffffff !important;  
        color: #000000 !important;  
        padding: 0 !important;  
        margin: 0 !important;  
        font-family: Arial, Helvetica, sans-serif !important;
        overflow: auto !important;
        height: auto !important;
    }  

    .container, .container-fluid {  
        max-width: 100% !important;  
        width: 100% !important;  
        margin: 0 !important;  
        padding: 0 !important;  
    }

    .card {
        background-color: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
    }
}

/* ----------------------------------------------------------------- */
/* 4. SAYFA İÇİ DİKEY BOŞLUKLARI TEMİZLEME VE KOMPAKTLEŞTİRME         */
/* ----------------------------------------------------------------- */
body > .container,  
body > .container-fluid,
.row.g-4 {
    margin-top: 0 !important;
    padding-top: 5px !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 5px !important;
    }
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ----------------------------------------------------------------- */
/* 5. MOBİL KART VE MASAÜSTÜ TABLO GEÇİŞ KURALLARI                 */
/* ----------------------------------------------------------------- */
.desktop-table-view { display: block; }
.mobile-card-view { display: none; }

.table-responsive { 
    max-height: calc(100vh - 280px); 
    overflow-y: auto; 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
}
.table-custom-dark thead th { 
    position: sticky; 
    top: 0; 
    z-index: 10; 
    background-color: #212529 !important; 
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.1); 
    text-align: center !important; 
    white-space: nowrap; 
}
.table-custom-dark thead th.th-left { text-align: left !important; padding-left: 15px !important; }
.table-custom-dark tbody td { text-align: center !important; white-space: nowrap; }
.table-custom-dark tbody td.td-left { text-align: left !important; padding-left: 15px !important; }

/* Mobil Ekranlar İçin (768px altı) Kart Görünümü Aktivasyonu */
@media (max-width: 768px) {
    .desktop-table-view { display: none !important; }
    .mobile-card-view { display: block !important; }
}

/* ================================================================= */
/* OTOMATİK EKRANA GÖRE KÜÇÜLEN ESNEK TABLO SİSTEMİ                  */
/* ================================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 280px);
}

.table-custom-dark {
    width: 100% !important;
    table-layout: auto !important; /* Sütunların içeriğe ve ekrana göre otomatik esnemesini sağlar */
}

.table-custom-dark th, 
.table-custom-dark td {
    /* Ekran küçüldükçe yazı boyutu da otomatik olarak küçülür (en az 0.7rem, en çok 0.85rem arasında esner) */
    font-size: clamp(0.7rem, 1.2vw, 0.85rem) !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
}

.table-custom-dark thead th {
    background-color: #212529 !important;
    position: sticky;
    top: 0;
    z-index: 10;
}