/* Pembelian OKI: the screens Buku Gaji does not have. Only var(--…) from tokens.css. */

.hero-slim { padding-top: 28px; padding-bottom: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); color: var(--muted); text-decoration: none; font-size: var(--small); }
.back-link svg { width: 18px; height: 18px; }
.stack > * + * { margin-top: 14px; }
.pre-line { white-space: pre-line; }
.form-sub { font-size: var(--small); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 20px; }
.field-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.textarea { min-height: 72px; resize: vertical; line-height: 1.4; }
select.input { appearance: auto; }
.file-btn { cursor: pointer; position: relative; }
.badge { font-weight: 600; }

.toolbar-sticky { position: sticky; top: var(--bar-h); z-index: 5; padding: 10px 0; background: var(--bg); }
.barang-warn { color: var(--warn); }
.pl-table .is-aneh { background: var(--danger-tint); color: var(--danger); font-weight: 700; }
.stats-pl .stat-value { font-size: 1.6rem; }

/* thumbnails */
.thumb { width: 72px; height: 56px; object-fit: contain; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid var(--hairline); flex: none; }
.thumb-sm { width: 56px; height: 44px; }
.thumb-kosong { display: grid; place-items: center; color: var(--muted); border-style: dashed; background: transparent; }
.thumb-kosong svg { width: 22px; height: 22px; }
.foto-besar { width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--radius); background: var(--raised); border: 1px solid var(--hairline); }
.detail-foto > * + * { margin-top: 10px; }

/* the master list */
.barang-grid { display: grid; gap: 10px; }
.barang-card { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 12px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.barang-card:hover { border-color: var(--line-strong); }
.barang-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.barang-kode { font-weight: 600; overflow-wrap: anywhere; }
.barang-sub { font-size: var(--small); color: var(--muted); overflow-wrap: anywhere; }
.barang-angka { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-variant-numeric: tabular-nums lining-nums; }
.barang-modal { color: var(--muted); }
.barang-modal strong { color: var(--ink); }
.modal-card { padding: 14px 16px; }
.kv .kv-total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--hairline); padding-top: 8px; }
.riwayat { display: grid; gap: 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--raised); }
.riwayat li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--hairline); font-size: var(--small); }
.riwayat li:first-child { border-top: 0; }
.riwayat a { color: var(--brand); }

/* one packing list */
.stats-pl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modal-line { font-size: var(--small); }
.pl-card { padding: 0; }
.pl-table td, .pl-table th { padding: 8px 8px; vertical-align: middle; }
.pl-table .td-item { white-space: normal; min-width: 170px; max-width: 230px; word-break: keep-all; overflow-wrap: anywhere; }
.pl-table .td-foto { width: 64px; }
.td-sub { display: block; font-size: var(--tiny); color: var(--muted); white-space: normal; }
.pl-table .is-manual { font-style: italic; text-decoration: underline dotted; text-underline-offset: 3px; }
.input-qty { width: 5.6em; min-height: var(--tap); padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.td-aksi { white-space: nowrap; }
.td-aksi .icon-btn { display: inline-grid; }
.td-aksi .icon-btn:disabled { opacity: 0.3; }
.danger-zone { padding-top: 12px; border-top: 1px solid var(--hairline); }

/* the picker */
.pilih-list { max-height: 52vh; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--raised); }
.pilih-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--hairline); }
.pilih-row:first-child { border-top: 0; }
.pilih-row.is-picked { background: var(--ok-tint); }
.pilih-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: var(--tap); cursor: pointer; }
.pilih-check input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.pilih-nama { min-width: 0; overflow-wrap: anywhere; }
.bebas summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--muted); font-size: var(--small); }
.sheet.dlg { width: min(720px, 100vw); }

@media (min-width: 960px) {
  .barang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-pl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media print {
  .pl-table .td-aksi, .actions, .danger-zone, .back-link { display: none !important; }
}

/* the "Lainnya" tab is a button: look like the links beside it */
button.tab { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; }
