/* ===== TABLE IMPROVEMENTS CSS ===== */
/* File ini berisi perbaikan kontras warna untuk semua tabel dan elemen di aplikasi */

/* ===== GLOBAL TABLE STYLING ===== */
.table {
    color: #343a40 !important;
    background-color: #ffffff !important;
}

.table th {
    color: #343a40 !important;
    font-weight: 600 !important;
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 0.875rem !important;
}

.table td {
    color: #343a40 !important;
    vertical-align: middle !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(32, 178, 170, 0.08) !important;
}

/* ===== BADGE IMPROVEMENTS ===== */
.badge {
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    padding: 0.375rem 0.75rem !important;
}

.badge.bg-dark {
    background-color: #343a40 !important;
    color: #ffffff !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #343a40 !important;
    border: 1px solid #dee2e6 !important;
}

.badge.bg-primary {
    background-color: #20B2AA !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #2E8B57 !important;
    color: #ffffff !important;
}

.badge.bg-info {
    background-color: #5F9EA0 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #343a40 !important;
    font-weight: 600 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.badge.bg-secondary {
    background-color: #6C757D !important;
    color: #ffffff !important;
}

/* Badge dengan opacity */
.badge.bg-info.bg-opacity-75 {
    background-color: rgba(95, 158, 160, 0.75) !important;
    color: #ffffff !important;
}

.badge.bg-info.bg-opacity-75.text-dark {
    color: #343a40 !important;
    font-weight: 600 !important;
}

/* ===== TEXT COLOR IMPROVEMENTS ===== */
.text-dark {
    color: #343a40 !important;
}

.text-muted {
    color: #6C757D !important;
}

.text-primary {
    color: #20B2AA !important;
}

.text-secondary {
    color: #6C757D !important;
}

.text-success {
    color: #2E8B57 !important;
}

.text-info {
    color: #5F9EA0 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* ===== CARD IMPROVEMENTS ===== */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125) !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.card-header {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125) !important;
}

.card-header h6 {
    color: #343a40 !important;
    font-weight: 600 !important;
}

/* ===== FORM IMPROVEMENTS ===== */
.form-label {
    color: #343a40 !important;
    font-weight: 500 !important;
}

.form-control, .form-select {
    color: #343a40 !important;
    border-color: #ced4da !important;
}

.form-control:focus, .form-select:focus {
    color: #343a40 !important;
    border-color: #20B2AA !important;
    box-shadow: 0 0 0 0.2rem rgba(32, 178, 170, 0.25) !important;
}

/* ===== BUTTON IMPROVEMENTS ===== */
.btn {
    font-weight: 500 !important;
}

.btn-primary {
    background-color: #20B2AA !important;
    border-color: #20B2AA !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #008B8B !important;
    border-color: #008B8B !important;
    color: #ffffff !important;
}

.btn-success {
    background-color: #2E8B57 !important;
    border-color: #2E8B57 !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #1e6b47 !important;
    border-color: #1e6b47 !important;
    color: #ffffff !important;
}

.btn-info {
    background-color: #5F9EA0 !important;
    border-color: #5F9EA0 !important;
    color: #ffffff !important;
}

.btn-info:hover {
    background-color: #4a7a7c !important;
    border-color: #4a7a7c !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #343a40 !important;
}

.btn-warning:hover {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #343a40 !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #20B2AA !important;
    border-color: #20B2AA !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #20B2AA !important;
    border-color: #20B2AA !important;
    color: #ffffff !important;
}

.btn-outline-info {
    color: #5F9EA0 !important;
    border-color: #5F9EA0 !important;
    background-color: transparent !important;
}

.btn-outline-info:hover {
    background-color: #5F9EA0 !important;
    border-color: #5F9EA0 !important;
    color: #ffffff !important;
}

.btn-outline-success {
    color: #2E8B57 !important;
    border-color: #2E8B57 !important;
    background-color: transparent !important;
}

.btn-outline-success:hover {
    background-color: #2E8B57 !important;
    border-color: #2E8B57 !important;
    color: #ffffff !important;
}

.btn-outline-danger {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: transparent !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

/* ===== FONT WEIGHT IMPROVEMENTS ===== */
.fw-semibold {
    font-weight: 600 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

/* ===== SMALL TEXT IMPROVEMENTS ===== */
.small {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
}

/* ===== TABLE RESPONSIVE IMPROVEMENTS ===== */
.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* ===== PROGRESS PENGEMBALIAN TABLE SCROLL ===== */
.progress-pengembalian-table {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #20B2AA #f8f9fa;
}

.progress-pengembalian-table::-webkit-scrollbar {
    height: 8px;
}

.progress-pengembalian-table::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.progress-pengembalian-table::-webkit-scrollbar-thumb {
    background: #20B2AA;
    border-radius: 4px;
}

.progress-pengembalian-table::-webkit-scrollbar-thumb:hover {
    background: #008B8B;
}

.progress-pengembalian-table .table {
    min-width: 800px;
    margin-bottom: 0;
}

.progress-pengembalian-table .table th,
.progress-pengembalian-table .table td {
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

/* ===== STATUS SPECIFIC IMPROVEMENTS ===== */
/* Status Menunggu */
.badge.bg-warning.text-dark {
    color: #343a40 !important;
    font-weight: 600 !important;
}

/* Status Disetujui */
.badge.bg-success {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Status Ditolak */
.badge.bg-danger {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Status Pengembalian */
.badge.bg-info {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Status Dikembalikan */
.badge.bg-secondary {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th, .table td {
        padding: 0.5rem 0.25rem !important;
    }
    
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* ===== HOVER EFFECTS ===== */
.table-hover tbody tr:hover {
    background-color: rgba(32, 178, 170, 0.08) !important;
}

.card:hover {
    border-color: #20B2AA !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* ===== FOCUS STATES ===== */
.btn:focus,
.form-control:focus,
.form-select:focus {
    border-color: #20B2AA !important;
    box-shadow: 0 0 0 0.2rem rgba(32, 178, 170, 0.25) !important;
}

/* ===== PAGINATION IMPROVEMENTS ===== */
.pagination .page-link {
    color: #20B2AA !important;
    border-color: #dee2e6 !important;
}

.pagination .page-link:hover {
    color: #008B8B !important;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
}

.pagination .page-item.active .page-link {
    background-color: #20B2AA !important;
    border-color: #20B2AA !important;
    color: #ffffff !important;
}

/* ===== DROPDOWN IMPROVEMENTS ===== */
.dropdown-item:hover {
    background-color: rgba(32, 178, 170, 0.1) !important;
    color: #343a40 !important;
}

.dropdown-item.active {
    background-color: #20B2AA !important;
    color: #ffffff !important;
}

/* ===== ALERT IMPROVEMENTS ===== */
.alert-primary {
    background-color: rgba(32, 178, 170, 0.1) !important;
    border-color: #20B2AA !important;
    color: #008B8B !important;
}

.alert-success {
    background-color: rgba(46, 139, 87, 0.1) !important;
    border-color: #2E8B57 !important;
    color: #2E8B57 !important;
}

.alert-info {
    background-color: rgba(95, 158, 160, 0.1) !important;
    border-color: #5F9EA0 !important;
    color: #5F9EA0 !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
    border-color: #ffc107 !important;
    color: #856404 !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}
