/* --- CSS CRM Leads (UTUH) --- */

/* 1. Pengaturan Tabel Utama */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 15px;
}

.table {
    table-layout: fixed; /* Kunci layout agar kolom patuh pada width yang ditentukan */
    width: 100%;
    min-width: 1100px; /* Minimal lebar agar tidak berhimpitan di mobile */
    border-collapse: collapse;
}

/* 2. Definisi Lebar Kolom (Sesuaikan dengan urutan header Anda) */
.table th:nth-child(1), .table td:nth-child(1) { width: 220px; } /* Konsumen */
.table th:nth-child(2), .table td:nth-child(2) { width: 180px; } /* Layanan */
.table th:nth-child(3), .table td:nth-child(3) { width: 100px; } /* Sumber */
.table th:nth-child(4), .table td:nth-child(4) { width: 120px; } /* Penawaran */
.table th:nth-child(5), .table td:nth-child(5) { width: 120px; } /* Input Oleh */
.table th:nth-child(6), .table td:nth-child(6) { width: 150px; } /* Harga */
.table th:nth-child(7), .table td:nth-child(7) { width: 180px; } /* Status */
.table th:nth-child(8), .table td:nth-child(8) { width: 140px; } /* Kolom Aksi */

/* 3. Styling Baris & Kolom */
.table td {
    white-space: normal;
    word-wrap: break-word;
    vertical-align: middle;
    padding: 12px 8px !important;
}

/* 4. Spesifik Kolom Aksi */
.table th:last-child, 
.table td:last-child {
    text-align: right !important;
    padding-right: 20px !important;
    background-color: #ffffff; /* Pastikan background putih */
}

/* 5. Container Tombol Aksi */
.btn-group-action {
    display: inline-flex;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
}

.btn-group-action .btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

/* 6. Optimasi Mobile */
@media (max-width: 768px) {
    /* Membuat kolom aksi menempel di kanan saat scroll (Sticky) */
    .table th:last-child, 
    .table td:last-child {
        position: sticky;
        right: 0;
        z-index: 10;
        box-shadow: -5px 0 10px rgba(0,0,0,0.05);
        border-left: 1px solid #eee;
    }
}