/* ==========================================================================
   honga — Sổ Cơ Khí Hoàng Nam: the tenant layer over the shared UI kit (kit v1.9).
   Copied to ../honga.css by _src/build.mjs; edit this file, not the copy.
   Linked after tokens.css, kit/fonts.css, kit/kit.css (and kit/look-app.css on phone pages).
   Rules: kit tokens and the honga-* tokens of tokens.json only, no colour literal, and every rule
   ends on a honga-* class (or an element inside one). Each block is a row of KIT_GAPS.md.
   ========================================================================== */

/* ---------- G1 The two books: Thực tế (solid ink square) and Hóa đơn (plum hatched square), always with the words ---------- */
.honga-bk { display: inline-block; inline-size: 0.625rem; block-size: 0.625rem; flex: none; border-radius: 1px; vertical-align: 0; }
.honga-bk-tt { background: var(--honga-tt); }
.honga-bk-hd { background: repeating-linear-gradient(135deg, var(--honga-hd) 0 1.5px, transparent 1.5px 3.4px); box-shadow: inset 0 0 0 1.5px var(--honga-hd); }
.honga-so { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.honga-so-tt { color: var(--honga-tt); }
.honga-so-hd { color: var(--honga-hd); }

/* Book columns in a table: a tint per book under the kit's .tbl, a 3px rule over the group head */
.honga-col-tt { background: var(--honga-tt-bg); }
.honga-col-hd { background: var(--honga-hd-bg); }
th.honga-col-hd { color: var(--honga-hd); }
.honga-bkh-tt { background: var(--honga-tt-bg); box-shadow: inset 0 3px 0 var(--honga-tt); }
.honga-bkh-hd { background: var(--honga-hd-tint); box-shadow: inset 0 3px 0 var(--honga-hd); color: var(--honga-hd); }
/* An HĐ unit price typed by hand (not derived from the factor): an outline in the HĐ line colour, said in words by the cell's label */
.honga-manual { box-shadow: inset 0 0 0 1px var(--honga-hd-line); }
/* A tag about the Hóa đơn book */
.honga-tag-hd { color: var(--honga-hd); background: var(--honga-hd-bg); border-color: var(--honga-hd-line); }
/* The legend swatch of an HĐ cell typed by hand */
.honga-sw-hd { display: inline-block; inline-size: 0.875rem; block-size: 0.875rem; margin-inline-end: var(--sp-2); vertical-align: -3px; border-radius: 2px; background: var(--honga-hd-bg); box-shadow: inset 0 0 0 1px var(--honga-hd-line); }

/* ---------- G2 The pair "Thực tế 18.075.420 · Hóa đơn 18.859.500" as two labelled values ---------- */
.honga-pair { display: inline-grid; grid-template-columns: auto auto; column-gap: var(--sp-3); row-gap: var(--sp-1); align-items: baseline; }
.honga-pair .honga-so { font-size: var(--fs-xs); }
.honga-pair-v { text-align: end; font-variant-numeric: tabular-nums; font-family: var(--font-figure, inherit); font-weight: 600; white-space: nowrap; }
.honga-pair-hd { color: var(--honga-hd); }

/* ---------- G3 Khung tên: the drawing title block that heads every document ---------- */
.honga-ktn { display: grid; grid-template-columns: repeat(var(--honga-ktn-cols, 6), minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--panel-border); border: 1.5px solid var(--text); border-radius: var(--radius-sm); overflow: hidden; }
.honga-ktn > div { min-width: 0; padding: var(--sp-2) var(--sp-3); background: var(--surface); }
.honga-ktn dt, .honga-ktn .honga-ktn-l { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-xs); font-weight: 500; line-height: 1.2; color: var(--muted); }
.honga-ktn dd { margin: 0; font-weight: 500; color: var(--text); }
.honga-ktn dd small { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.honga-ktn .honga-ktn-big { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.honga-ktn .honga-ktn-span-2 { grid-column: span 2; }
.honga-ktn .honga-ktn-span-3 { grid-column: span 3; }
.honga-ktn .honga-ktn-span-4 { grid-column: span 4; }
.honga-ktn .honga-ktn-span-all { grid-column: 1 / -1; }
.honga-ktn .honga-ktn-sunk { background: var(--surface-2); }
.honga-ktn-ro { display: flex; align-items: center; min-height: var(--control-h, 2.25rem); margin: 0; color: var(--muted); }
@media (max-width: 48rem) {
  .honga-ktn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .honga-ktn > [class*="honga-ktn-span"] { grid-column: 1 / -1; }
}

/* ---------- G4 The column letter of the customer's Excel file, beside a column title ---------- */
.honga-xl { display: inline-flex; align-items: center; justify-content: center; min-inline-size: 1.125rem; block-size: 1.0625rem; padding-inline: var(--sp-1); margin-inline-start: var(--sp-1); font-size: var(--fs-xs); font-weight: 500; line-height: 1; color: var(--muted); background: var(--surface); border: 1px solid var(--panel-border); border-radius: 2px; vertical-align: 1px; }

/* ---------- G5 The brand mark: an I-beam section, brass on ink (tokens mark-fg, mark-bg) ---------- */
.honga-mark-svg { display: block; inline-size: 1.375rem; block-size: 1.375rem; }
.honga-mark-lg { inline-size: 3rem; block-size: 3rem; }
.honga-mark-lg .honga-mark-svg { inline-size: 1.875rem; block-size: 1.875rem; }

/* ---------- G7 The sign-in drawing: an engineering drawing of a bracket, drawn in the slot the kit gives (svg.login-art in .login-aside) ---------- */
/* Paths take stroke="currentColor" fill="none" in the markup; the classes set the weights and the lettering. */
.honga-draw { color: var(--aside-muted, var(--sunk)); }
.honga-draw .honga-draw-thin { stroke-width: 0.75; }
.honga-draw .honga-draw-dim { opacity: 0.8; }
.honga-draw text { font-family: var(--font-heading); font-size: 12px; font-weight: 500; fill: currentColor; stroke: none; }
.honga-draw .honga-draw-tb-t { font-weight: 600; fill: var(--aside-fg, var(--surface)); }
