/* ======================================================
   ORDER-SUPPLIER.CSS (v2)
   ====================================================== */

.os-tab-bar{
    display:flex;
    gap:8px;
    margin-bottom:16px;
    overflow-x:auto;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
}

.os-tab-bar::-webkit-scrollbar{
    display:none;
}

.os-tab{
    flex:0 0 auto;
    background:#F3F4F6;
    color:#6B7280;
    border:none;
    border-radius:999px;
    padding:9px 16px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
}

.os-tab.aktif{
    background:#111827;
    color:#FFFFFF;
}

.os-tab-content{
    display:none;
}

.os-tab-content.aktif{
    display:block;
}

/* ---- Kartu item di Buat Order ---- */

.os-item-list{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:10px;
}

.os-item-kosong{
    font-size:12.5px;
    color:#9CA3AF;
    text-align:center;
    padding:16px 0;
}

.os-item-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#F9FAFB;
    border:1px solid #F3F4F6;
    border-radius:10px;
    padding:10px 12px;
}

.os-item-row-info strong{
    display:block;
    font-size:13px;
    color:#111827;
}

.os-item-row-info span{
    font-size:12px;
    color:#6B7280;
}

.os-item-row-harga{
    text-align:right;
    margin-right:8px;
}

.os-item-row-harga strong{
    display:block;
    font-size:12.5px;
    color:#111827;
}

.os-item-row-harga span{
    font-size:11px;
    color:#9CA3AF;
}

.os-item-row button{
    width:26px;
    height:26px;
    border:none;
    background:#FEE2E2;
    color:#DC2626;
    border-radius:8px;
    font-size:12px;
    cursor:pointer;
    flex-shrink:0;
}

.os-total-box{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#111827;
    color:#FFFFFF;
    border-radius:10px;
    padding:12px 14px;
    margin-bottom:6px;
}

.os-total-box span{
    font-size:12.5px;
    color:#D1D5DB;
}

.os-total-box strong{
    font-size:16px;
}

/* ---- Kartu order di Cek Order (meniru gaya kartu Return) ---- */

.os-order-list{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.os-order-kosong{
    font-size:13px;
    color:#9CA3AF;
    text-align:center;
    padding:30px 0;
}

.os-order-card{
    border:1px solid #ECECEC;
    border-radius:14px;
    padding:12px 14px;
    overflow-x:hidden;
}

.os-order-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
    margin-bottom:12px;
    padding-bottom:12px;
    border-bottom:1px solid #F3F4F6;
}

.os-order-info{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.os-order-info strong{
    font-size:13.5px;
    color:#111827;
}

.os-order-info span{
    font-size:12.5px;
    color:#6B7280;
}

.os-status-pill{
    padding:4px 10px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
    flex-shrink:0;
}

.os-status-berjalan{
    background:#FEF3C7;
    color:#92400E;
}

.os-status-selesai{
    background:#DCFCE7;
    color:#166534;
}

.os-order-item{
    border-bottom:1px solid #F3F4F6;
    padding:5px 0;
}

.os-order-item:last-child{
    border-bottom:none;
    padding-bottom:0;
}

.os-order-item:first-of-type{
    padding-top:0;
}

.os-summary-supplier{
    display:flex;
    gap:8px;
    margin-bottom:14px;
}

/* Saat dipindah JS ke dalam .os-tab-bar (khusus peran Supplier) -
   dibuat lebih ringkas supaya pas sejajar dengan tinggi tab pill
   "Cek Order", bukan margin-bottom lagi (karena sudah jadi 1 baris). */
.os-tab-bar .os-summary-supplier{
    flex:1;
    margin-bottom:0;
}

.os-summary-item{
    flex:1;
    background:#FFFFFF;
    border:1px solid #ECECEC;
    border-radius:12px;
    padding:12px 14px;
}

.os-tab-bar .os-summary-item{
    padding:5px 10px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:1px;
    white-space:normal;
}

.os-tab-bar .os-summary-item span{
    margin-bottom:0;
    font-size:9px;
    line-height:1.15;
    white-space:nowrap;
}

.os-tab-bar .os-summary-item strong{
    font-size:12.5px;
    white-space:nowrap;
}

.os-summary-item span{
    display:block;
    font-size:11px;
    color:#9CA3AF;
    margin-bottom:4px;
}

.os-summary-item strong{
    font-size:15px;
    color:#111827;
}

.os-btn-download-pdf{
    display:block;
    width:100%;
    background:#FFFFFF;
    border:1.5px solid #16A34A;
    color:#16A34A;
    border-radius:12px;
    padding:12px;
    font-size:13px;
    font-weight:700;
    font-family:inherit;
    cursor:pointer;
    margin-bottom:14px;
}

.os-btn-download-pdf:active{
    background:#F0FDF4;
}

.os-produk-judul{
    font-size:14px;
    font-weight:700;
    color:#111827;
    margin-bottom:4px;
    padding-bottom:6px;
    border-bottom:1px solid #F3F4F6;
}

.os-kolom-header{
    display:grid;
    grid-template-columns:1.3fr 0.8fr 1.1fr 0.9fr;
    gap:6px;
    padding:0 2px 6px;
    font-size:10px;
    font-weight:700;
    color:#9CA3AF;
    text-transform:uppercase;
    letter-spacing:.02em;
}

.os-item-line{
    display:grid;
    grid-template-columns:1.3fr 0.6fr 1.1fr 1fr;
    gap:5px;
    align-items:center;
}

.os-item-produk{
    display:flex;
    flex-direction:column;
    gap:1px;
}

.os-item-produk strong{
    font-size:13px;
    color:#111827;
}

.os-item-produk span{
    font-size:11.5px;
    color:#6B7280;
}

.os-item-line > span{
    font-size:12px;
    color:#111827;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* Kolom pertama (Varian) DIKECUALIKAN dari pemotongan "..." - kalau
   namanya panjang (misal "BURGUNDY 37"), biarkan melipat ke baris
   baru sendiri, jangan pernah dipotong sampai tidak terbaca. Batasan
   nowrap+ellipsis di atas TETAP berlaku untuk kolom angka (Order,
   Harga, Jumlah) - itu tujuan awalnya, supaya angka panjang tidak
   pecah ke baris baru. */
.os-item-line > span:first-child{
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
    overflow-wrap:break-word;
}

.os-unit-muted{
    color:#9CA3AF;
    font-weight:500;
}

.os-item-line input{
    width:100%;
    height:34px;
    border:1px solid #D1D5DB;
    border-radius:8px;
    padding:0 8px;
    font-size:12.5px;
    font-family:inherit;
}

.os-item-aksi{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.os-item-aksi input{
    width:100%;
    height:38px;
    border:1px solid #D1D5DB;
    border-radius:10px;
    padding:0 12px;
    font-size:13px;
    font-family:inherit;
    box-sizing:border-box;
}

.os-item-aksi button{
    width:100%;
    padding:0 16px;
    font-size:12.5px;
}

.os-static-value{
    height:38px;
    display:flex;
    align-items:center;
    padding:0 12px;
    background:#F9FAFB;
    border:1px solid #F3F4F6;
    border-radius:10px;
    font-size:13px;
    color:#111827;
    font-weight:600;
}

.os-sisa-tag{
    display:inline-block;
    margin-top:6px;
    padding:2px 8px;
    border-radius:999px;
    font-size:10.5px;
    font-weight:700;
}

.os-sisa-ada{
    background:#FEF3C7;
    color:#92400E;
}

.os-sisa-habis{
    background:#DCFCE7;
    color:#166534;
}

.os-riwayat-list{
    margin-top:10px;
    padding-left:8px;
    border-left:2px solid #F3F4F6;
}

.os-riwayat-list div{
    font-size:11px;
    color:#9CA3AF;
    padding:2px 0;
}

/* ---- Riwayat Barang Masuk (read-only) ---- */

.os-bm-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.os-bm-kosong{
    font-size:13px;
    color:#9CA3AF;
    text-align:center;
    padding:30px 0;
}

.os-bm-row{
    background:#FFFFFF;
    border:1px solid #ECECEC;
    border-radius:12px;
    padding:12px 14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.os-bm-row-info strong{
    display:block;
    font-size:13px;
    color:#111827;
}

.os-bm-row-info span{
    font-size:11.5px;
    color:#6B7280;
}

.os-bm-row-nilai{
    text-align:right;
}

.os-bm-row-nilai strong{
    display:block;
    font-size:13px;
    color:#111827;
}

.os-bm-row-nilai span{
    font-size:11px;
    color:#9CA3AF;
}

/* ---- Kolom Tindakan di Cek Order Karyawan (ikon pensil + X) ---- */

.os-tindakan-icons{
    display:flex;
    gap:6px;
    justify-content:flex-end;
    margin-left:8px;
}

.os-btn-icon-tindakan{
    width:26px;
    height:26px;
    border:none;
    border-radius:8px;
    background:#F3F4F6;
    color:#374151;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
}

.os-btn-icon-tindakan .material-symbols-rounded{
    font-size:15px;
}

.os-btn-icon-hapus{
    background:#FEE2E2;
    color:#DC2626;
}

/* ---- Tombol "Kembalikan" di tab Barang Masuk (staging) ---- */

.os-btn-kembalikan{
    background:#FEE2E2;
    color:#DC2626;
    border:none;
    border-radius:8px;
    padding:6px 4px;
    font-size:11px;
    font-weight:600;
    font-family:inherit;
    cursor:pointer;
}
