/* ===== GÜNLÜK ŞASİ TAKİP SİSTEMİ ===== */
/* Tüm class'lar cd- prefix ile benzersiz */

/* === Ana Stat Bar === */
.cd-stats-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/* === Chassis Tab Filter Overrides === */
#chassis-tab .filter-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
    gap: 10px;
}

#chassis-tab .filter-item {
    min-width: 0;
}

#chassis-tab .filter-item label {
    font-size: 0.78rem;
}

#chassis-tab .filter-item input,
#chassis-tab .filter-item select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    box-sizing: border-box;
    font-size: 0.88rem;
}

#chassis-tab .filter-item input[type="date"] {
    line-height: 1.2;
}

.cd-stat-main {
    background: linear-gradient(145deg, #fff 0%, #faf8f5 100%);
    border-radius: 4px;
    padding: 16px 20px;
    border: 1px solid #d1d5db;
    text-align: center;
}

.cd-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1d8f00;
    display: block;
}

.cd-stat-label {
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
    display: block;
    margin-top: 4px;
}

/* === Sıfırla Butonu === */
.cd-filter-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(145deg, #8b7355 0%, #75604a 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cd-filter-btn:hover {
    opacity: 0.9;
}

.cd-filter-btn-reset {
    background: linear-gradient(145deg, #fff 0%, #f5f2ed 100%);
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.cd-filter-btn-reset:hover {
    background: linear-gradient(145deg, #f5f2ed 0%, #efe9e0 100%);
}

/* === Günlük Bölümler === */
.cd-daily-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cd-day-section {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

/* === Gün Başlığı === */
.cd-day-header {
    padding: 12px 16px;
    background: linear-gradient(145deg, #f5f2ed 0%, #efe9e0 100%);
    border-bottom: 1px solid #d1d5db;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cd-day-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
}

.cd-day-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.cd-day-stat {
    font-size: 0.78rem;
    font-weight: 500;
    color: #4b5563;
    white-space: nowrap;
}

.cd-day-stat strong {
    font-weight: 700;
}

.cd-stat-transporting strong {
    color: #2a9908;
}

.cd-stat-present strong {
    color: #1a1a1a;
}

.cd-stat-remaining strong {
    color: #0300a7;
}

/* === Tablo === */
.cd-day-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cd-day-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.cd-th {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cd-td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.78rem;
    color: #374151;
    vertical-align: middle;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    line-height: 1.35;
}

.cd-td code {
    background: transparent;
    border: none;
    padding: 0;
  
    font-size: 0.85rem;
}

.cd-row:hover {
    background: #faf8f5;
}

/* === Durum Renkleri === */
.cd-status {
    font-weight: 600;
    font-size: 0.72rem;
}

.cd-status-pending {
    color: #1a1a1a;
}

.cd-status-transporting {
    color: #f59e0b;
}

.cd-status-delivered {
    color: #2ba805;
}

/* === Boş Durum === */
.cd-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 0.8rem;
}

/* === Yükleniyor === */
.cd-loading {
    text-align: center;
    padding: 30px 20px;
    color: #8b7355;
    font-size: 0.78rem;
}

/* === Responsive: Tablet === */
@media (max-width: 768px) {
    #chassis-tab .filter-container {
        grid-template-columns: 1fr;
    }

    #chassis-tab .filter-item input,
    #chassis-tab .filter-item select {
        min-height: 42px;
        font-size: 16px;
    }

    #chassis-tab #cdResetFilter {
        width: 100%;
    }

    .cd-day-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
    }

    .cd-day-stats {
        flex-direction: column;
        gap: 4px;
    }

    .cd-stat-value {
        font-size: 1.3rem;
    }

    .cd-th {
        padding: 8px;
        font-size: 0.68rem;
    }

    .cd-td {
        padding: 6px 8px;
        font-size: 0.74rem;
    }
}

/* === Responsive: Mobil === */
@media (max-width: 480px) {
    #chassis-tab .filter-item label {
        font-size: 0.74rem;
    }

    .cd-stat-main {
        padding: 12px 14px;
    }

    .cd-stat-value {
        font-size: 1.1rem;
    }

    .cd-stat-label {
        font-size: 0.65rem;
    }

    .cd-day-date {
        font-size: 0.78rem;
    }

    .cd-day-stat {
        font-size: 0.65rem;
    }

    .cd-th {
        padding: 6px;
        font-size: 0.62rem;
    }

    .cd-td {
        padding: 5px 6px;
        font-size: 0.7rem;
    }

    .cd-td code {
        font-size: 0.68rem;
    }

    .cd-filter-btn {
        padding: 6px 10px;
        font-size: 0.68rem;
        min-height: 32px;
    }
}
