/* Turnover Oranı Hesaplama CSS - Excel'e Uygun Tasarım */

.hb-turnover-analiz {
    padding: 0px;
	margin-bottom: 15px;
}

/* Başlık */
.hb-turnover-header {
    margin-bottom: 15px;
}

.hb-turnover-title {
    color: #2B542C;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* Tablo Üst Kontroller */
.hb-turnover-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
}

.hb-turnover-table-header .hb-turnover-control-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.hb-turnover-table-header .hb-turnover-control-item label {
    margin-bottom: 0;
    white-space: normal;
    /*font-size: 11px;*/
    line-height: 1.2;
    text-align: left;
}

.hb-turnover-table-header .hb-turnover-input {
    width: 80px;
    min-width: 80px;
    height: 38px;
    padding: 6px 8px;
}

.hb-turnover-table-header .hb-turnover-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Kontroller (Eski - artık kullanılmıyor ama yedek olarak bırakıyorum) */
.hb-turnover-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
}

.hb-turnover-control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.hb-turnover-control-item label {
    font-weight: 600;
    color: #495057;
    /*font-size: 13px;*/
}

.hb-turnover-input {
    padding: 8px 12px;
    border: 2px solid #28a745;
    border-radius: 10px;
    font-size: 14px;
    background: #fff3cd;
    text-align: center;
    min-width: 120px;
}

.hb-turnover-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.hb-turnover-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.hb-turnover-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    height: 38px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hb-turnover-btn-calculate,
.hbAnaliz-btn-calculate {
    background: #245269;
    color: white;
}

.hb-turnover-btn-calculate:hover,
.hbAnaliz-btn-calculate:hover {
    background: #245269;
}

.hb-turnover-btn-secondary {
    background: #6c757d;
    color: white;
}

.hb-turnover-btn-secondary:hover {
    background: #5a6268;
}

.hb-turnover-btn-success {
    background: #2B542C;
    color: white;
}

.hb-turnover-btn-success:hover {
    background: #2B542C;
}

.hb-turnover-btn-success:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Ana İçerik */
.hb-turnover-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 0;
    padding-top: 0;
}

/* Tablo */
.hb-turnover-table-container {
    overflow-x: auto;
    margin-bottom: 0;
    margin-top: 0;
    padding-top: 0;
}

.hb-turnover-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    background: #ffffff;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin: 0;
}

.hb-turnover-table thead th {
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    /*font-size: 11px;*/
    border: 1px solid #d9d9d9;
    border-radius: 0;
    height: 40px;
}

.hb-turnover-table tbody td {
    padding: 0px 0px 0px 5px;
    border: 1px solid #d9d9d9;
    border-radius: 0;
    height: 32px;
    position: relative; /* Bar için gerekli */
    overflow: hidden; /* Bar için gerekli */
}

/* Köşe yuvarlamaları - 10px */
/* Sol üst: Aylar (Ocak başlığı) */
.hb-turnover-table thead tr th.hb-th-month:first-child {
    border-top-left-radius: 10px;
}

/* Sağ üst: Yıllık Kümülatif Turnover başlığı */
.hb-turnover-table thead tr th.hb-th-cumulative:last-child {
    border-top-right-radius: 10px;
}

/* Sol alt: Aralık (son satır, Aylar sütunu) */
.hb-turnover-table tbody tr:last-child td.hb-td-month:first-child {
    border-bottom-left-radius: 10px;
}

/* Sağ alt: Son satır, Yıllık Kümülatif Turnover sütunu */
.hb-turnover-table tbody tr:last-child td.hb-td-cumulative:last-child {
    border-bottom-right-radius: 10px;
}

/* Sütun Renkleri */
.hb-th-month {
    background: #fff3cd !important;
    color: #333;
}

.hb-th-begin,
.hb-td-begin,
.hb-th-end,
.hb-td-end {
	padding: 0 !important;	
    background: #f8f9fa !important;
}

.hb-th-hired,
.hb-td-hired {
	padding: 0 !important;	
    background: #DFF0D8 !important; /* Açık yeşil - İşe Giren */
}

.hb-th-left,
.hb-td-left {
	padding: 0 !important;		
    background: #F2DEDE !important; /* Açık kırmızı - İşten Ayrılan (çıkış) */
}

.hb-th-monthly {
	padding: 0 !important;	
    background: #D9EDF7 !important; /* Açık mavi - Aylık Turnover başlık */
}

.hb-td-monthly {
	padding: 0 !important;	
    background: #ffffff !important; /* Hücre arka planı beyaz - bar rengi JS'den gelecek */
}

.hb-th-cumulative {
	padding: 0 !important;	
    background: #FCF8E3 !important; /* Açık sarı - Yıllık Kümülatif Turnover başlık */
}

.hb-td-cumulative {
	padding: 0 !important;	
    background: #ffffff !important; /* Hücre arka planı beyaz - bar rengi JS'den gelecek */
}

/* Tablo Input ve Değerler */
.hb-turnover-cell-input {
    width: 100%;
    padding: 4px 6px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    height: 100%;
    box-sizing: border-box;
}

/* Number input oklarını gizle */
.hb-turnover-cell-input::-webkit-inner-spin-button,
.hb-turnover-cell-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.hb-turnover-cell-input[type="number"] {
    -moz-appearance: textfield;
}

.hb-turnover-cell-input:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    background: #ffffff;
}

.hb-turnover-cell-input[readonly] {
    background: #f0f0f0;
    cursor: not-allowed;
}

.hb-turnover-value {
    display: block;
    padding: 0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    position: relative;
    overflow: hidden;
    min-height: 32px;
}

/* Tablo genişliklerini daralt */
.hb-turnover-table {
    /*font-size: 12px;*/
}

.hb-th-month {
    min-width: 55px;
    max-width: 55px;
}

.hb-th-begin,
.hb-th-end,
.hb-th-hired,
.hb-th-left {
    min-width: 75px;
    max-width: 75px;
}

.hb-th-monthly,
.hb-th-cumulative {
    min-width: 85px;
    max-width: 85px;
}

/* Grafikler */
.hb-turnover-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 0;
    max-height: 100%;
    overflow: hidden;
    align-self: stretch;
}

.hb-turnover-chart-container {
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(50% - 10px);
}

.hb-turnover-chart-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.hb-turnover-chart-title {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
    flex-shrink: 0;
}

.hb-turnover-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .hb-turnover-content {
        grid-template-columns: 1fr;
    }
    
    .hb-turnover-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hb-turnover-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .hb-turnover-control-item {
        width: 100%;
    }

    .hb-turnover-actions {
        justify-content: flex-start;
    }

    .hb-turnover-content {
        grid-template-columns: 1fr;
    }

    .hb-turnover-table-container {
        overflow-x: scroll;
    }

    .hb-turnover-table {
        min-width: 600px;
    }
}

