/* hongloan (Bảng Lương HTC): only what the kit lacks, plus layout glue. Tokens only. */

/* ---------- layout glue ---------- */
.hl-attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); }
.hl-attn > li { border-bottom: 1px solid var(--panel-border); }
.hl-attn .work-item { height: 100%; }

/* wide payroll sheet: the name column keeps one readable width */
.hl-name { min-width: 11.5rem; }
.hl-sheet td, .hl-sheet th { vertical-align: middle; }

/* Excel-like entry grid: column widths for the typed cells (KIT_GAPS G1, G2).
   .cell-input is a kit class (KIT_GAPS G2, D4): the kit's box falls to 88px, the note needs 176px.
   Delete when the kit has column width presets for sheet columns by value type. */
.hl-grid .cell-input { width: 100%; }
.hl-grid col.hl-col-hours { width: 6.5rem; }
.hl-grid col.hl-col-qty { width: 6rem; }
.hl-grid col.hl-col-money { width: 8.5rem; }
.hl-grid col.hl-col-note { width: 11rem; }
.hl-grid .hl-note > .cell-input { min-width: 11rem; }
.hl-grid .hl-name { min-width: 10rem; }
.hl-grid .hl-flags { width: 10rem; min-width: 10rem; white-space: normal; }
.hl-cell-check { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); }

/* reconcile: the file's figure under the app's figure in a mismatched cell (KIT_GAPS G6) */
.hl-diff { background: var(--warn-bg); }
.hl-diff .cell-sub { color: var(--text); }

/* a money figure the owner has not asked to see yet (KIT_GAPS G4) */
.hl-secret[data-hidden="true"] .hl-secret-value { display: none; }
.hl-secret .hl-secret-mask { display: none; letter-spacing: 0.12em; }
.hl-secret[data-hidden="true"] .hl-secret-mask { display: inline; }

/* ---------- payslip on paper, sheet PHIẾU LƯƠNG (KIT_GAPS G3) ----------
   Touches .paper-head, .paper-title, .paper-sub, .paper-sign and .paper-sign-slot inside the slip only: the tallest slip is
   138mm and half an A4 sheet is about 140mm; two-up sheets set --sign-space 14mm (the kit says 18mm or more).
   Delete when the kit has a two-per-sheet paper layout (.paper-2up). */
.hl-slip { display: flex; flex-direction: column; gap: 2.2mm; font-size: 9.5pt; line-height: 1.28; }
.hl-slip .paper-head { margin-bottom: 0; padding-bottom: 1.6mm; }
.hl-slip .paper-title { margin: 0; font-size: 13pt; }
.hl-slip .paper-sub { margin: 0; }
.hl-slip-facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8mm; margin: 0; }
.hl-slip-facts > div { display: flex; justify-content: space-between; gap: 3mm; padding-block: 0.6mm; border-bottom: 0.2mm dotted currentColor; }
.hl-slip-facts dt { margin: 0; }
.hl-slip-facts dd { margin: 0; font-weight: 700; text-align: end; }
.hl-slip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; align-items: start; }
.hl-slip table { width: 100%; border-collapse: collapse; }
.hl-slip table th, .hl-slip table td { padding: 0.7mm 1.4mm; border: 0.2mm solid currentColor; text-align: start; vertical-align: top; }
.hl-slip table .num { text-align: end; white-space: nowrap; }
.hl-slip table .hl-stt { width: 7mm; text-align: center; }
.hl-slip table tr.hl-sum > * { font-weight: 700; }
.hl-slip-net { display: flex; justify-content: space-between; gap: 4mm; padding: 1.4mm 2mm; border: 0.5mm solid currentColor; font-weight: 700; font-size: 11pt; }
.hl-slip p { margin: 0; }
.hl-slip .paper-sign { margin-top: 0; }
.hl-slip .paper-sign-slot { min-height: 17mm; }
.hl-slip-date { text-align: end; font-style: italic; }
.hl-slip-temp { margin: 0; font-size: 14pt; font-weight: 700; text-align: center; letter-spacing: 0.2em; }

/* two slips on one A4 portrait sheet, with a cut line between them */
.hl-two-up { display: grid; grid-template-rows: 1fr 1fr; padding-block: 5mm; }
.hl-two-up > .hl-slip + .hl-slip { padding-top: 2.5mm; border-top: 0.2mm dashed currentColor; }
/* half a sheet is about 140 mm: the tighter type that keeps the longest slip inside it */
.hl-two-up .hl-slip { gap: 1mm; font-size: 8.4pt; line-height: 1.16; }
.hl-two-up .hl-slip .paper-head { padding-bottom: 0.8mm; }
.hl-two-up .hl-slip .paper-title { font-size: 11pt; line-height: 1.15; }
.hl-two-up .hl-slip-facts > div { padding-block: 0.2mm; }
.hl-two-up .hl-slip table :is(th, td) { padding: 0.25mm 1.2mm; }
.hl-two-up .hl-slip-net { padding: 0.6mm 2mm; font-size: 9.5pt; }
.hl-two-up .paper-sign { --sign-space: 14mm; }
.hl-two-up .hl-slip .paper-sign-slot { min-height: 0; }

/* ---------- LƯƠNG TỔNG on two A4 landscape sheets (KIT_GAPS G5) ----------
   Sheet 1 (16 columns) is 7pt, sheet 2 (10 columns, .hl-ledger-net) 8.5pt: on one sheet the 22 columns only fit at 5.4pt.
   Touches .paper-head, .paper-sub and .paper-sign (--sign-space 14mm, the kit says 18mm or more) inside the ledger only.
   Delete when the kit has a dense paper table (.paper-tbl-dense) with a second line for unit prices. */
.hl-ledger { padding: 5mm 4mm; font-size: 7pt; line-height: 1.12; }
.hl-ledger-net { font-size: 8.5pt; }
.hl-ledger.hl-ledger-net :is(th, td) { padding: 0.6mm 1mm; }
.hl-ledger table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hl-ledger th, .hl-ledger td { padding: 0.25mm 0.3mm; border: 0.2mm solid currentColor; vertical-align: middle; overflow-wrap: break-word; }
.hl-ledger thead th { text-align: center; font-weight: 700; }
.hl-ledger .num { text-align: end; white-space: nowrap; }
.hl-ledger .hl-under { display: block; font-size: 6pt; font-style: italic; }
.hl-ledger-net .hl-under { display: inline; margin-inline-start: 1.5mm; font-size: 7pt; }
.hl-ledger tr.hl-group > * { font-weight: 700; }
.hl-ledger col.hl-w-stt { width: 2.2%; }
.hl-ledger col.hl-w-code { width: 3.4%; }
.hl-ledger col.hl-w-name { width: 10%; }
.hl-ledger-net col.hl-w-stt { width: 2.8%; }
.hl-ledger-net col.hl-w-code { width: 5%; }
.hl-ledger-net col.hl-w-name { width: 26%; }
.hl-ledger h1 { margin: 0; font-size: 12pt; text-align: center; }
.hl-ledger .paper-sub { margin: 0 0 1.6mm; }
.hl-ledger .paper-head { font-size: 8pt; margin-bottom: 1.6mm; padding-bottom: 1mm; }
.hl-ledger .paper-sign { --sign-space: 14mm; margin-top: 3mm; font-size: 8pt; }

/* ---------- a chosen file's name in a narrow column (KIT_GAPS G16) ----------
   The kit's .file-name cuts with an ellipsis: the customer's file name needs 382px in a 345px column at 1280.
   Delete when the kit has a wrapping file name. */
.file-name.hl-file-wrap { white-space: normal; overflow-wrap: anywhere; }

/* ---------- phone ---------- */
.hl-phone-page { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4); }
.hl-phone-people .work-item { padding-block: var(--sp-2); }

/* screen-only bar above printed sheets */
.hl-print-page { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4); }

@media print {
  .hl-print-page { padding: 0; }
}
