/* nguyenhuyson.css: Sổ Tổ Xe, the tenant's own stylesheet, linked after the kit files.
   It holds only (a) components the kit lacks, prefixed nguyenhuyson-, and (b) layout glue for these screens.
   Every colour, space, radius, type size and shadow is a var(--*) token (kit tokens, or the nhs-* tenant tokens in tokens.json); no kit class is restyled.
   Each rule names its gap in KIT_GAPS.md and says when to delete it. */

/* G1 · A plan job inside a sheet cell (KH TUẦN, KH THÁNG). The kit's .cell-edit holds one single-line .cell-input; a day cell here holds one or more jobs
   ("7h P5 ĐI HÀ NỘI", "13h30 P11 ĐI KT CHÉO CAO BẰNG (LX07)") that wrap like the customer's Excel cells, each with its own state.
   Delete when the kit has a multi-entry sheet cell. */
.nguyenhuyson-job { display: block; min-width: 0; font-size: var(--fs-sm); line-height: var(--lh-tight); white-space: normal; overflow-wrap: anywhere; }
.nguyenhuyson-job + .nguyenhuyson-job { margin-top: var(--sp-1); padding-top: var(--sp-1); border-top: 1px dashed var(--panel-border); }
.nguyenhuyson-job-gio { font-weight: 600; font-variant-numeric: tabular-nums; }
.nguyenhuyson-job-noi { font-weight: 600; color: var(--link); }
.nguyenhuyson-job-thay { font-weight: 600; }
.nguyenhuyson-job-km { display: block; margin-top: var(--sp-1); font-size: var(--fs-xs); font-weight: 600; color: var(--ok); font-variant-numeric: tabular-nums; }
.nguyenhuyson-job[data-state="hoan"] { color: var(--muted); }
.nguyenhuyson-job[data-state="huy"] { color: var(--muted); }
.nguyenhuyson-job[data-state="huy"] .nguyenhuyson-job-nd { text-decoration: line-through; }
.nguyenhuyson-job .cell-flags { margin-top: var(--sp-1); }

/* G3 · A printed document in the customer's frame (BTH, TQT, NK, KH TUẦN, Giấy xin lĩnh vật tư ...): the document font and type size, the centred
   title block and the place-and-date line. The kit gives .paper, .paper-head, .paper-sign and a .tbl-marks in .paper (its type is set "on the table to change it").
   Delete when the kit has a document title block. */
.nguyenhuyson-doc { font-family: var(--nhs-doc-font); font-size: var(--nhs-doc-fs); }
.nguyenhuyson-doc .tbl-marks { font-size: var(--nhs-doc-fs); }
.nguyenhuyson-doc .tbl-marks.nguyenhuyson-doc-sm { font-size: var(--nhs-doc-fs-sm); }
.nguyenhuyson-doc-title { margin: 0; font-size: var(--nhs-doc-fs-title); font-weight: 700; text-align: center; text-transform: uppercase; }
.nguyenhuyson-doc-sub { margin: var(--nhs-doc-gap-sm) 0 0; font-weight: 700; text-align: center; }
.nguyenhuyson-doc-lead { margin: var(--nhs-doc-gap) 0 0; }
.nguyenhuyson-doc-block { margin-top: var(--nhs-doc-gap); }
.nguyenhuyson-doc-place { margin: var(--nhs-doc-gap) 0 0; font-style: italic; text-align: end; }
.nguyenhuyson-doc-foot { margin: var(--nhs-doc-gap) 0 0; font-size: var(--nhs-doc-fs-sm); font-style: italic; }
.nguyenhuyson-doc-stamp { display: flex; justify-content: flex-end; margin-bottom: var(--nhs-doc-gap-sm); }
/* The national heading at the top right of the forms that carry it in his workbook (BTH J1:V1, TQT XE G1, đề nghị cấp xd A1:G1):
   "CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM" over "Độc lập - Tự do - Hạnh phúc", both bold, the motto underlined. It sits in .paper-head before .paper-doc. */
.nguyenhuyson-doc-qh { flex: none; margin-inline-start: auto; line-height: var(--lh-tight); text-align: center; }
.nguyenhuyson-doc-qh p { margin: 0; font-weight: 700; }
.nguyenhuyson-doc-qh-name { text-transform: uppercase; }
.nguyenhuyson-doc-qh-motto { text-decoration: underline; }
/* A figure never breaks inside a paper table cell. The kit gives every .paper .tbl-marks cell overflow-wrap: anywhere (KIT_GAPS D4), which split "1.800,000"
   over two lines in a 48 px column. Each sheet's <col> widths fit its longest figure, so nothing spills. */
.nguyenhuyson-doc .tbl-marks td.num { white-space: nowrap; overflow-wrap: normal; }

/* G4 · Four signers in a row (BTH: GIÁM ĐỐC, PHÒNG TCKT, PHÒNG KH&VT, Tổ xe). The kit's .paper-sign has three columns or two (.paper-sign-2).
   Same parts (.paper-sign-slot, -role, -hint) in a four-column row. Delete when the kit adds .paper-sign-4. */
.nguyenhuyson-sign4 { --sign-space: var(--nhs-sign-space); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 var(--nhs-doc-gap); margin-top: var(--nhs-doc-gap-lg); text-align: center; break-inside: avoid; }

/* G9 · The signer's printed name under the signing space ("Lái xe 01" under NGƯỜI QUYẾT TOÁN), as on the customer's TQT, BTH and TQT MP sheets.
   The kit's .paper-sign-slot has a role and a hint, then the empty space; it has no part for a name below the space. Delete when the kit adds .paper-sign-name. */
.nguyenhuyson-sign-name { display: block; margin-top: var(--nhs-sign-space); font-weight: 700; }

/* G8 · Layout glue: a week or month sheet whose day cells hold wrapped text keeps a sensible row height and lets the day columns keep their width. */
.nguyenhuyson-sheet td { vertical-align: top; }
