/* Baris invoice berbaris: tiap baris dua tingkat. Daftar sengaja tanpa scroll/overflow sendiri agar dropdown shipment tidak terpotong. */
.il { --il-border: rgba(128, 128, 128, 0.3); --il-surface: #fff; font-size: 0.8125rem; container-type: inline-size; }
.dark .il { --il-surface: #18181b; }
.il-list { border: 1px solid var(--il-border); border-radius: 0.6rem; }
.il-row {
    display: grid;
    gap: 0.5rem;
    align-items: end;
    padding: 0.6rem 0.75rem;
    grid-template-columns: 1.5rem minmax(0, 1fr) 4.5rem 5.5rem 8.5rem 8.5rem;
    grid-template-areas:
        'no shipment shipment kind vat actions'
        'no description qty uom price amount';
}
.il-row ~ .il-row { border-top: 1px solid var(--il-border); }
.il-row:first-of-type { border-radius: 0.55rem 0.55rem 0 0; }
.il-row:last-of-type { border-radius: 0 0 0.55rem 0.55rem; }
.il-row:first-of-type:last-of-type { border-radius: 0.55rem; }
.il-row:nth-of-type(even) { background: rgba(128, 128, 128, 0.05); }
.il-no { grid-area: no; align-self: center; font-weight: 600; opacity: 0.55; }
.il-shipment { grid-area: shipment; position: relative; min-width: 0; }
.il-kind { grid-area: kind; }
.il-vat { grid-area: vat; display: flex; align-items: center; gap: 0.4rem; height: 2rem; }
.il-actions { grid-area: actions; display: flex; justify-content: flex-end; align-items: center; height: 2rem; }
.il-description { grid-area: description; min-width: 0; }
.il-qty { grid-area: qty; }
.il-uom { grid-area: uom; }
.il-price { grid-area: price; }
.il-amount { grid-area: amount; text-align: right; }
.il-amount strong { display: block; line-height: 2rem; white-space: nowrap; }
.il-label { display: block; font-size: 0.6875rem; opacity: 0.65; margin-bottom: 0.15rem; }
.il-input {
    width: 100%;
    height: 2rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--il-border);
    border-radius: 0.4rem;
    background: var(--il-surface);
    color: inherit;
    font-size: 0.8125rem;
}
.il-input:focus { outline: 2px solid var(--primary-600, #2583c5); outline-offset: -1px; }
.il-pick { display: block; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.il-muted { opacity: 0.6; }
.il-menu { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 0.2rem; padding: 0.4rem; border: 1px solid var(--il-border); border-radius: 0.5rem; background: var(--il-surface); box-shadow: 0 8px 24px rgb(0 0 0 / 0.18); }
.il-options { max-height: 16rem; overflow-y: auto; margin-top: 0.3rem; }
.il-option { display: block; width: 100%; text-align: left; padding: 0.35rem 0.5rem; border-radius: 0.35rem; cursor: pointer; }
.il-option:hover { background: rgba(128, 128, 128, 0.14); }
.il-note { padding: 0.35rem 0.5rem; opacity: 0.65; }
.il-actions button { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 0.4rem; cursor: pointer; }
.il-actions button:hover:not(:disabled) { background: rgba(128, 128, 128, 0.14); }
.il-actions button:disabled { opacity: 0.3; cursor: default; }
.il-actions .il-danger { color: #dc2626; }
.il-icon { width: 1.05rem; height: 1.05rem; }
.il-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; }
.il-add { padding: 0.4rem 0.9rem; border-radius: 0.5rem; background: var(--primary-600, #2583c5); color: #fff; font-weight: 600; cursor: pointer; }
.il-errors { margin-top: 0.4rem; color: #dc2626; font-size: 0.8125rem; }
.il-totals { font-size: 0.8125rem; font-weight: 600; line-height: 1.6; border-top: 1px solid rgba(128, 128, 128, 0.3); padding-top: 0.75rem; }
.il-total-block + .il-total-block { margin-top: 0.6rem; }

/* kartu Invoice di kolom kanan ikut menempel saat halaman digulung; bila layar lebih pendek dari kartunya, isinya bisa digulung */
@media (min-width: 1024px) {
    .il-aside { position: sticky; top: 4.75rem; align-self: start; max-height: calc(100vh - 5.5rem); overflow-y: auto; }
}

@container (max-width: 44rem) {
    .il-row {
        grid-template-columns: 1.5rem repeat(2, minmax(0, 1fr));
        grid-template-areas:
            'no shipment shipment'
            'no description description'
            'no kind vat'
            'no qty uom'
            'no price amount'
            'no actions actions';
    }
}
