/* ═══════════════════════════════════════════════════════════════════════
   Puantaj Yönetim Sistemi — Özel Stiller
   Bootstrap 5 üzerine inşa edilmiştir.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Genel Layout ───────────────────────────────────────────────────── */
html, body {
    height: 100%;
    font-size: 14px;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main.container-fluid {
    flex: 1;
}

/* ── Puantaj Tablosu ─────────────────────────────────────────────────── */

/* Yatay kaydırma ile sabit yükseklik */
.puantaj-table-container {
    max-height: calc(100vh - 300px);
    overflow: auto;
    position: relative;
}

/* Sticky thead — tablo kaydırılırken başlıklar sabit kalır */
.puantaj-table thead.sticky-thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #212529;
    color: #fff;
    border-color: #495057;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 6px 8px;
}

/* Mikro field adı satırı (başlığın altında, soluk görünüm) */
.puantaj-table thead .field-row th {
    position: sticky;
    top: 35px; /* ilk thead tr'nin yüksekliği kadar */
    z-index: 2;
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 2px 8px;
    background-color: #e9ecef;
}

/* Veri hücreleri */
.puantaj-table tbody td {
    font-size: 0.78rem;
    padding: 4px 8px;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ── Sütun Tiplerine Göre Renklendirme ──────────────────────────────── */

/* TANIMSIZ sütunlar — eşleştirme bekliyor */
.tanimsiz-sutun {
    background-color: #fff3cd !important; /* Bootstrap warning-subtle */
    color: #856404;
}

/* API-excluded sütunlar — sadece görüntüleme */
.excluded-sutun {
    background-color: #e9ecef !important;
    color: #6c757d;
}

/* ── Satır Durumu Renklendirme (Bootstrap table-* override) ─────────── */

/* Bootstrap'ın table-danger ve table-warning zaten var,
   burada hover state'ini de kapsıyoruz */
.table-danger:hover > td {
    background-color: #f1aeb5 !important;
}

.table-warning:hover > td {
    background-color: #ffe083 !important;
}

/* ── Kart ve Navbar İyileştirmeleri ────────────────────────────────── */
.card {
    border-radius: 8px;
}

.navbar {
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
footer.footer {
    font-size: 0.75rem;
}

/* ── Form Geliştirmeleri ─────────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ── Giriş Ekranı ───────────────────────────────────────────────────── */
.card.login-card {
    max-width: 420px;
    margin: 0 auto;
}

/* ── Yükleme Animasyonu ─────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Responsive: Küçük Ekranlar ─────────────────────────────────────── */
@media (max-width: 768px) {
    .puantaj-table-container {
        max-height: calc(100vh - 250px);
    }
}
