/* clbetong.css — Sổ Mẫu Bê Tông, the tenant layer over UI kit v1.9.
   Only what the kit lacks, and layout glue. Every value is a token (var(--*)); every class starts with clb-; no kit component is restyled.
   Each block names its row in KIT_GAPS.md. */

/* G1 · Drawn tem: stands in for the photo of the paper label stuck on the cube (no signature, no person's name is drawn). */
.clb-tem {
  --clb-ink: var(--info);
  display: grid;
  gap: var(--sp-1);
  box-sizing: border-box;
  width: min(100%, 22rem);
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  color: var(--text);
  text-align: start;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius-sm);
  box-shadow: var(--sh-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
}
.clb-tem-head { display: grid; justify-items: center; gap: var(--sp-1); padding-bottom: var(--sp-2); border-bottom: 2px solid var(--text); text-align: center; }
.clb-tem-title { font-family: var(--font-heading); font-size: var(--fs-lg); font-weight: 700; }
.clb-tem-brand { font-family: var(--font-heading); font-size: var(--fs-md); font-weight: 600; color: var(--muted); }
.clb-tem-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: var(--sp-2); padding-block: var(--sp-1); border-bottom: 1px dotted var(--field-border); }
.clb-tem-row-2 { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
.clb-tem-k { font-weight: 600; white-space: nowrap; }
.clb-tem-v { font-family: var(--font-heading); font-size: var(--fs-lg); font-style: italic; color: var(--clb-ink); overflow-wrap: anywhere; }
.clb-tem-sign { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--sp-2); border: 1px solid var(--text); font-size: var(--fs-xs); font-weight: 600; text-align: center; }
.clb-tem-sign > span { min-height: 2.75rem; padding: var(--sp-1); border-inline-start: 1px solid var(--text); }
.clb-tem-sign > span:first-child { border-inline-start: 0; }
/* a part the AI is not sure of, marked on the picture as on the form */
.clb-tem [data-flag] { background: var(--warn-bg); outline: 2px dashed var(--warn); outline-offset: 1px; }
.clb-tem-sm { box-shadow: none; zoom: 0.42; }
.clb-tem-login { transform: rotate(-3deg); box-shadow: var(--sh-3); }
.clb-tem-mo { filter: blur(3px); }

/* G2 · Drawn page of the customer's sổ: two hand-ruled bands, the same rows (SHEET_MAPPING, sổ · Trang 1). */
.clb-so {
  display: grid;
  gap: var(--sp-3);
  box-sizing: border-box;
  width: 100%;
  padding: var(--sp-3);
  color: var(--text);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--sh-2);
  font-size: var(--fs-xs);
}
.clb-so-band { display: grid; border-top: 1px solid var(--info-line); border-inline-start: 1px solid var(--info-line); }
.clb-so-top { grid-template-columns: 1.4rem 3.7rem 1.8rem 3.7rem minmax(0, 1fr) 2rem 2.4rem; }
.clb-so-bottom { grid-template-columns: 3rem 3rem 3.2rem minmax(0, 1fr); }
.clb-so-band > span {
  overflow: hidden;
  min-height: 1.5rem;
  padding-inline: var(--sp-1);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-style: italic;
  line-height: 1.5rem;
  color: var(--info);
  white-space: nowrap;
  border-inline-end: 1px solid var(--info-line);
  border-bottom: 1px solid var(--info-line);
}
.clb-so-band > .clb-so-h { font-family: var(--font-body); font-size: var(--fs-xs); font-style: normal; font-weight: 600; line-height: var(--lh-tight); color: var(--text); white-space: normal; }

/* G3 · The frame round a photo (tem or sổ page) with its caption; the review grid puts it left of the form on a wide screen. */
.clb-photo { display: grid; justify-items: center; gap: var(--sp-3); margin: 0; padding: var(--sp-4); background: var(--sunk); border-radius: var(--radius-lg); }
.clb-photo > figcaption { justify-self: stretch; justify-content: space-between; }
.clb-review { display: grid; grid-template-columns: minmax(20rem, 2fr) minmax(0, 3fr); align-items: start; gap: var(--sp-6); }
.clb-review > .clb-photo { position: sticky; top: calc(var(--topbar-h) + var(--sp-4)); }
/* Chụp sổ on a computer: the page photo beside the summary, the draft table full width under both */
.clb-review-wide { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); }
.clb-review-wide > .clb-photo { position: static; }
/* a tall page photo kept to a short frame that scrolls; Phóng to opens it whole */
.clb-photo-scroll { justify-self: stretch; max-height: 22rem; overflow: auto; border-radius: var(--radius-sm); }
.clb-photo-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 64rem) {
  .clb-review, .clb-review-wide { grid-template-columns: minmax(0, 1fr); }
  .clb-review > .clb-photo { position: static; }
}
/* the photo inside a kit thumbnail is a button that opens it large */
.clb-thumb { display: grid; place-items: center; overflow: hidden; padding: 0; font: inherit; color: inherit; border: 0; cursor: zoom-in; }

/* G4 · A field the AI filled. data-ai="xem": the AI is not sure — tinted, the reason in words, and "Đúng"; Lưu stays locked meanwhile. */
.clb-ai[data-ai="xem"] { padding: var(--sp-3); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); }
.clb-ai-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--warn); }
.clb-ai-note > span { flex: 1 1 10rem; }
.clb-ai[data-ai="daxem"] .clb-ai-note { display: none; }
/* the same state on a cell of the Chụp sổ draft table */
td.clb-xem { background: var(--warn-bg); box-shadow: inset 0 0 0 2px var(--warn-line); }

/* G5 · Stat tile as a link (Hôm nay: a tile jumps to its group of Lịch nén). */
a.stat.clb-stat-link { color: inherit; text-decoration: none; }
a.stat.clb-stat-link:hover { background: var(--surface-hover); }
a.stat.clb-stat-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* G6 · Ngày nén tự tính under the age chips, and the live % đạt under Lực nén. */
.clb-nen { display: grid; gap: var(--sp-2); margin-top: var(--sp-3); padding: var(--sp-3); background: var(--surface-2); border-radius: var(--radius); }
.clb-nen > .label { margin: 0; }
.clb-kq { display: grid; gap: var(--sp-2); }
.clb-w-age { width: 8rem; }

/* G7 · Rows of the Chụp sổ draft on a phone (one card per lần đúc, one block per dòng). */
.clb-dong-list { display: grid; margin: 0; padding: 0; list-style: none; }
.clb-dong { display: grid; gap: var(--sp-2); padding-block: var(--sp-3); border-top: 1px solid var(--panel-border); }
.clb-dong:first-child { padding-top: 0; border-top: 0; }

/* G8 · Camera pages: the kit's .cam takes the whole phone screen; the drawn photo sits in the aiming frame. */
.clb-cam { height: 100dvh; }
.clb-cam-spacer { width: 2.75rem; }
.cam-frame > .clb-tem { zoom: 0.7; box-shadow: none; }
.cam-frame > .clb-so { width: 36rem; zoom: 0.52; box-shadow: none; }
.clb-cam-status { position: absolute; inset-inline: var(--sp-4); bottom: var(--sp-4); display: grid; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); color: var(--text); background: var(--surface); border-radius: var(--radius); }
.clb-cam-status > p { margin: 0; font-weight: 650; }

/* G9 · Sign-in art: the drawn tem, cut by the art band like a photo half in view. */
.clb-login-art { overflow: hidden; max-height: 16rem; align-content: start; }
.clb-login-art > .clb-tem { margin-top: var(--sp-8); }
.login-split .clb-login-art { max-height: none; align-content: center; }
.login-split .clb-login-art > .clb-tem { margin-top: 0; }
/* the sign-in page has no shell: on a phone the page carries the form's surface to the bottom; on a computer the card sits mid-screen */
.clb-page-login { background: var(--surface); }
.clb-login-page { display: grid; align-content: center; min-height: 100dvh; }
