/* Sổ Vật Tư Đại Phúc: only what the kit lacks. Prefix vh-. Gaps are logged in KIT_GAPS.md. */

/* A quantity that carries its unit in the cell (units differ from row to row): right-aligned, tabular. */
.vh-r { text-align: right; }
.vh-sl { display: block; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl .vh-sl { text-align: left; }

/* Dense office tables with many columns: tighter cells, titles may wrap. */
.tbl.vh-tight th, .tbl.vh-tight td { padding-inline: var(--sp-2); }
.tbl.vh-tight thead th { white-space: normal; vertical-align: bottom; }
.tbl.vh-wrap td { white-space: normal; }
.vh-lock { display: inline-flex; vertical-align: middle; color: var(--muted); }
/* A long name (company, supplier) takes two form columns so it is never cut inside its field. */
@media (min-width: 64rem) { .vh-wide { grid-column: span 2; } }

/* Office lists must fit their frame from 1280 px up: text cells wrap; figures, quantities, codes and tags stay on one line. */
.tbl.vh-fit { font-size: var(--fs-sm); }
.tbl.vh-fit th, .tbl.vh-fit td { padding-inline: var(--sp-2); }
.tbl.vh-fit thead th { white-space: normal; vertical-align: bottom; }
.tbl.vh-fit td, .tbl.vh-fit tbody th, .tbl.vh-fit .cell-sub { white-space: normal; }
.tbl.vh-fit :is(td.num, .vh-sl, .doc-code, .nowrap, .tag) { white-space: nowrap; }
.tbl.vh-fit .cell-flags { flex-wrap: wrap; }
.tbl.vh-fit tbody th .cell-sub.wrap { display: block; min-width: 10rem; }
.tbl.vh-fit .vh-text { min-width: 20rem; }

/* Phone: the calendar button inside a date field is a full touch target. */
[data-look="app"] #main .datepicker-btn { min-block-size: 2.75rem; min-inline-size: 2.75rem; }

/* Photo gallery and viewer. */
.vh-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--sp-4); list-style: none; margin: 0; padding: 0; }
.vh-gallery > li { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.vh-gallery > li[hidden] { display: none; }
.vh-gallery p { margin: 0; font-size: var(--fs-sm); }
.vh-photo, .vh-viewer { display: flex; align-items: center; justify-content: center; background: var(--sunk); border: 1px solid var(--panel-border); border-radius: var(--radius); color: var(--muted); }
.vh-photo { aspect-ratio: 4 / 3; cursor: zoom-in; }
.vh-photo .icon { inline-size: var(--sp-8); block-size: var(--sp-8); }
.vh-viewer { block-size: 16rem; }
.vh-viewer .icon { inline-size: var(--sp-8); block-size: var(--sp-8); }
.vh-viewer[data-zoom] { block-size: 28rem; }
.vh-tile { text-align: left; cursor: zoom-in; inline-size: 100%; }

/* Purchase-request line: amount and remove button in the last column. */
.vh-line { margin: 0; padding: 0; min-inline-size: 0; }
.vh-line-total { display: flex; flex-direction: column; gap: var(--sp-1); align-items: flex-end; }
.vh-line-total output { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Settings: the list of choice lists as a vertical tab list. */
.vh-lists { grid-template-areas: "side main"; grid-template-columns: 16rem minmax(0, 1fr); }
.vh-lists > .page-side { grid-area: side; }
.vh-lists > .page-main { grid-area: main; }
.vh-listnav { display: flex; flex-direction: column; gap: var(--sp-1); }
.vh-listnav [role="tab"][aria-selected="true"] { background: var(--sunk); font-weight: 600; }

/* Printed request form PĐN-02, on the kit's A4 sheet. */
.vh-print-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border-block-end: 1px solid var(--panel-border); }
.vh-print-bar h1 { margin: 0; font-size: var(--fs-lg); }
.vh-paper-info { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1) var(--sp-6); margin: var(--sp-4) 0; }
.vh-paper-info dd { margin: 0; font-weight: 600; }
.vh-draft-mark { text-align: center; font-weight: 700; border: 2px dashed currentcolor; padding: var(--sp-2); }
@media print { .vh-print-bar { display: none; } }
