
.container {
    padding: 20px;
}

h3 {
    margin-bottom: 15px;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th, table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

table th {
    background: #b81414;
    color: #fff;
}

/* BADGE */
.badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #fff;
}

.badge.pending { background: #f1c40f; color: #000; }
.badge.approved { background: #2ecc71; }
.badge.rejected { background: #e74c3c; }
.badge.returned { background: #3498db; }

/* BUTTON */
.btn {
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
}

.btn-detail { background: #2980b9; }
.btn-approve { background: #27ae60; }
.btn-reject { background: #b81414; }

/* ALERT */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}



.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* CARD */
.card {
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}


.card-title {
    font-weight: bold;
    margin-bottom: 8px;
}

/* BENTROK */
.bentrok {
    color: red;
    font-weight: bold;
}

.badge.canceled {
    background-color: #6c757d; /* Abu-abu */
    color: white;
}

/* Jika tombol cancel ingin warna oranye/merah gelap */
.btn-cancel {
    background-color: #b81414;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.modal-box {
    background: #fff;
    width: 400px;
    max-width: 90%;
    padding: 20px;
    border-radius: 8px;
    animation: fadeIn 0.2s ease-in-out;
}

.modal-box h3 {
    margin-bottom: 10px;
}

.modal-textarea {
    width: 100%;
    padding: 10px;
    resize: none;
}

.modal-action {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}



/* STYLE UNTUK approval_detail.php */

h3{
padding-top: 50px;
}

.detail-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-row .card {
    flex: 1;
    min-width: 250px;
}

/* tombol rata kanan */
.action-btn {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .detail-row {
        flex-direction: column;
    }
}
/* --- LAYOUT DESKTOP --- */

/* Kartu Statistik: 4 Kolom Sejajar */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* Container Chart: 2 Kolom Sejajar */
.charts-grid {
    display: flex;
    flex-wrap: nowrap; /* Memaksa sejajar di desktop */
    gap: 20px;
    width: 100%;
}

.box-chart {
    flex: 1; /* Membagi ruang 50% - 50% */
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-width: 0; /* Penting agar chart tidak meluap */
}

.canvas-container {
    position: relative;
    height: 300px; /* Atur tinggi diagram di sini */
    width: 100%;
}

/* --- RESPONSIVE MOBILE (Berurut ke bawah) --- */
@media (max-width: 992px) {
    .cards {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di tablet */
    }
}

@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr; /* 1 kolom di HP */
    }

    .charts-grid {
        flex-direction: column; /* Berurut ke bawah di HP */
    }

    .canvas-container {
        height: 250px;
    }
}
/* ===================================== */
/* RESPONSIVE TABLE → CARD (MOBILE) */
/* ===================================== */
@media (max-width: 768px) {

    table thead {
        display: none;
    }

    table,
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
    }

    table {
        border: none;
    }

    table tr {
        margin-bottom: 15px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.08);
        padding: 12px;
    }

    table td {
        border: none;
        border-bottom: 1px solid #eee;
        padding: 8px 10px 8px 45%;
        position: relative;
        text-align: left;
        min-height: 35px;
        padding-left: 10px;
    }

    table td:last-child {
        border-bottom: none;
    }

    table td::before {
        content: attr(data-label);
        position: static;
        display: block;
        width: 100%;
        margin-bottom: 5px;
        font-weight: 600;
        color: #b81414;
    }

    /* Checkbox khusus */
    .td-checkbox {
        padding-left: 10px !important;
    }

    .td-checkbox::before {
        display: none;
    }

    /* Tombol full width */
    .btn {
        display: block;
        width: 100%;
        margin-top: 5px;
        text-align: center;
    }

}
                            

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 25px;
}


.charts-container {
    display: flex;
    flex-direction: row; 
    gap: 20px;
}

.box-chart {
    flex: 1; 
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chart-wrapper {
    position: relative;
    height: 300px; 
}


@media (max-width: 768px) {
    
    
    .cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

  
    .charts-container {
        flex-direction: column; 
    }

    .chart-wrapper {
        height: 250px; 
    }

    
    .topbar {
        flex-direction: column;
        height: auto;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }
}

