/* ==========================================================================
   Asset-tag module: printed tag label (gn-tag.js <GnLabel>) and shell bits
   Labels are a preview of a physical sticker: white paper and black ink in both themes, sized in mm.
   ========================================================================== */
:root {
  --gn-label-paper: #ffffff;
  --gn-label-ink: #111111;
  --gn-band-own: #111111;
  --gn-band-third: #6b2fa0;
  --gn-band-ink: #ffffff;
}

/* ---------- Shell: wordmark logos ---------- */
.sb-brand .sb-logo {
  height: 34px;
}
.login-hero .login-logo {
  width: 280px;
}
.login-body .login-logo {
  width: 210px;
}

/* ---------- Label: one layout, every size sets the variables ---------- */
.gn-label {
  --w: 50mm;
  --h: 30mm;
  --pad: 1.4mm;
  --band: 3.4mm;
  --band-fs: 1.9mm;
  --qr: 18mm;
  --gap: 1.6mm;
  --group-fs: 2.1mm;
  --big-fs: 5.4mm;
  --full-fs: 2.2mm;
  --foot: 3mm;
  --foot-fs: 1.65mm;
  box-sizing: border-box;
  width: var(--w);
  height: var(--h);
  display: grid;
  grid-template-rows: auto 1fr var(--foot);
  overflow: hidden;
  background: var(--gn-label-paper);
  color: var(--gn-label-ink);
  border: 0.2mm solid var(--gn-label-ink);
  border-radius: 1mm;
  font-family: var(--f-body);
  line-height: 1.1;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  break-inside: avoid;
}
.gn-label-band {
  height: var(--band);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gn-band-own);
  color: var(--gn-band-ink);
  font-size: var(--band-fs);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  overflow: hidden;
}
.gn-label.is-third .gn-label-band {
  background: var(--gn-band-third);
}
.gn-label.no-band {
  grid-template-rows: 1fr var(--foot);
}
.gn-label-body {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: var(--pad) var(--pad) 0;
  min-height: 0;
}
.gn-label-qr {
  flex: none;
  width: var(--qr);
  height: var(--qr);
}
.gn-label-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.gn-label-main {
  display: flex;
  flex-direction: column;
  gap: 0.6mm;
  min-width: 0;
}
.gn-label-group {
  display: flex;
  align-items: baseline;
  gap: 0.8mm;
  align-self: flex-start;
  max-width: 100%;
  padding: 0.3mm 0.8mm;
  border: 0.2mm solid var(--gn-label-ink);
  border-radius: 0.6mm;
  font-size: var(--group-fs);
  white-space: nowrap;
  overflow: hidden;
}
.gn-label-group b {
  font-weight: 800;
}
.gn-label-group span {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* YY-NNNN must fit beside the QR at every size: the font sizes above leave room for 7 bold tabular digits */
.gn-label-big {
  max-width: 100%;
  overflow: hidden;
  font-size: var(--big-fs);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gn-label-full {
  font-family: var(--f-mono);
  font-size: var(--full-fs);
  font-weight: 500;
  white-space: nowrap;
}
.gn-label-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad);
  font-size: var(--foot-fs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 70 × 40 mm: large equipment */
.gn-label--70x40 {
  --w: 70mm;
  --h: 40mm;
  --pad: 2mm;
  --band: 4.6mm;
  --band-fs: 2.6mm;
  --qr: 25mm;
  --gap: 2.4mm;
  --group-fs: 2.9mm;
  --big-fs: 7.6mm;
  --full-fs: 3mm;
  --foot: 4mm;
  --foot-fs: 2.3mm;
}
/* A4 sheet cell: 38 × 21 mm */
.gn-label--a4 {
  --w: 38mm;
  --h: 21mm;
  --pad: 1mm;
  --band: 2.4mm;
  --band-fs: 1.4mm;
  --qr: 12.5mm;
  --gap: 1.1mm;
  --group-fs: 1.5mm;
  --big-fs: 3.9mm;
  --full-fs: 1.6mm;
  --foot: 2.3mm;
  --foot-fs: 1.25mm;
  border-radius: 0.6mm;
}
/* 30 × 15 mm: small items – too small for the group name and the footer text */
.gn-label--30x15 {
  --w: 30mm;
  --h: 15mm;
  --pad: 0.7mm;
  --band: 1.6mm;
  --band-fs: 0;
  --qr: 10.6mm;
  --gap: 0.9mm;
  --group-fs: 1.4mm;
  --big-fs: 3.1mm;
  --full-fs: 1.25mm;
  --foot: 0mm;
  border-radius: 0.5mm;
}
.gn-label--30x15 .gn-label-group span,
.gn-label--30x15 .gn-label-foot {
  display: none;
}
.gn-label--30x15 .gn-label-main {
  gap: 0.3mm;
}

/* A4 sheet: 5 × 13 cells of 38 × 21 mm (190 × 273 mm) centred on the page */
.gn-a4-sheet {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 12mm 10mm;
  display: grid;
  grid-template-columns: repeat(5, 38mm);
  grid-auto-rows: 21mm;
  align-content: start;
  background: var(--gn-label-paper);
  break-after: page;
}
.gn-a4-sheet .gn-label {
  border-radius: 0;
  border-width: 0.1mm;
}

/* ==========================================================================
   Stage 1 screens: catalogs (validity, classification levels), readiness, asset register, overview
   ========================================================================== */
.gn-gap {
  margin-top: 12px;
}

/* ---------- Catalog list: state switch, links inside the form ---------- */
.gn-state {
  align-self: flex-start;
  max-width: 100%;
  overflow-x: auto;
}
.gn-state button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline: 12px;
}
.gn-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- Classification levels + preview ---------- */
.gn-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.gn-levels-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.gn-levels .field {
  margin: 0;
}
.gn-lv {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.gn-lv b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--green-1);
  color: var(--green-6);
  font-size: 12px;
}
/* Live code preview: a brand-tinted panel, the code parts in the mono face like the printed codes */
.gn-code-preview {
  border: 1px dashed var(--green-3);
  border-radius: var(--r);
  background: color-mix(in srgb, var(--green-1) 65%, transparent);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gn-code-parts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px;
}
.gn-code-part {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.gn-code-sep {
  font-size: 19px;
  line-height: 1.2;
  color: var(--muted);
  padding-inline: 1px;
}
.gn-code-part b {
  font-family: var(--f-mono);
  font-size: 19px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.gn-code-part small {
  font-size: 11px;
  color: var(--muted);
}
.gn-code-part.is-empty b {
  color: var(--line-2);
}
.gn-code-name {
  font-weight: 600;
}
.gn-code-preview p {
  margin: 0;
}
@media (min-width: 640px) {
  .gn-levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .sheet.lg .gn-levels-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Pickers: classification search, employee search ---------- */
.gn-cpick,
.gn-epick,
.gn-epick-pop {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.gn-cpick-sel,
.gn-epick-sel {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 8px 10px;
  min-height: var(--field-h);
}
.gn-cpick-sel > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gn-epick-sel > .icon {
  color: var(--muted);
  flex: none;
}
.gn-cpick-mode {
  align-self: flex-start;
}
.gn-cpick-mode button {
  flex: 0 0 auto;
  padding-inline: 12px;
}
.gn-cpick-list {
  display: flex;
  flex-direction: column;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.gn-cpick-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
}
.gn-cpick-opt:last-child {
  border-bottom: 0;
}
.gn-cpick-opt:hover,
.gn-cpick-opt:focus-visible {
  background: var(--surface-2);
}
.gn-cpick-opt.on {
  background: var(--brand-soft);
}
.gn-cpick-opt b {
  font-size: 13px;
}
.gn-cpick-opt span {
  font-size: 13.5px;
}
.gn-cpick-none {
  margin: 0;
  padding: 10px 12px;
}
.gn-cpick-match {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* ---------- Asset card ---------- */
.gn-tagcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gn-tagcard-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
/* Tag number as the mock's tag pill, larger */
.gn-tagno {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: var(--r);
  background: var(--surface-3);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.gn-tagno .icon {
  width: 18px;
  height: 18px;
  color: var(--green-6);
}
.gn-tagno.none {
  font-size: 17px;
  color: var(--warn);
  background: var(--warn-soft);
}
.gn-tagno.none .icon {
  color: var(--warn);
}
.gn-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.gn-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gn-audit-link {
  margin-top: 10px;
}
.pre-line {
  white-space: pre-line;
}
/* A dotted mat under the paper label; the label itself keeps its printed colours */
.gn-tag-preview {
  display: flex;
  justify-content: center;
  padding: 18px 12px;
  border-radius: var(--r);
  background:
    radial-gradient(circle, var(--line-2) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  overflow-x: auto;
}
.gn-tag-preview .gn-label {
  flex: none;
  box-shadow: var(--shadow);
}
/* The card history sits right under its header row; nested change lists (audit entries) are not timeline items */
.gn-timeline {
  margin-top: 12px;
}
.gn-timeline .chg li {
  padding: 0;
}
.gn-timeline .chg li::before,
.gn-timeline .chg li::after {
  display: none;
}
.gn-timeline li.tl-attr::before {
  border-color: var(--info);
}
.gn-timeline li.tl-tag::before {
  border-color: var(--ok);
}
.gn-timeline li.tl-audit::before {
  border-color: var(--line-2);
}
.gn-chg {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.gn-chg s {
  color: var(--muted);
}
.gn-chg b {
  color: var(--ink);
}

/* ---------- Readiness ---------- */
.gn-site-chips {
  flex-wrap: wrap;
}
/* Result card: brand wash when ready, rose wash when a session is blocked */
.gn-ready {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 16px;
  padding: 20px;
  color: inherit;
  background: var(--grad-soft);
}
.gn-ready.is-bad {
  background: linear-gradient(115deg, var(--bad-soft), var(--glass) 70%);
}
.gn-ready h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.gn-ready p {
  margin: 0;
  color: var(--text-2);
}
.gn-ready .xs {
  margin-top: 4px;
  color: var(--muted);
}
.gn-ready .stat-chips {
  grid-column: 1 / -1;
}
@media (min-width: 820px) {
  .gn-ready {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 22px 24px;
  }
  .gn-ready .stat-chips {
    grid-column: auto;
    grid-template-columns: repeat(2, 168px);
  }
}
.gn-ready-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.gn-ready-ic .icon {
  width: 26px;
  height: 26px;
}
.gn-problems {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.gn-problem .card-h {
  gap: 12px;
}
.gn-problem-ic {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: none;
}
.gn-problem-ic .icon {
  width: 18px;
  height: 18px;
}
.gn-problem .list {
  margin-top: 10px;
}
/* "Sửa ›" on one line (the generic .item .trail stacks its children) */
.gn-problem .item .trail {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  color: var(--green-6);
  font-weight: 600;
}
.gn-problem .card-b > p {
  margin-top: 0;
}
.gn-problem .card-b > p.xs {
  margin-top: 10px;
}
@media (min-width: 1024px) {
  .gn-problems {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Overview: hero ring + chips, bars, readiness banner, quick links ---------- */
.gn-dash {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.gn-dash-pill {
  max-width: 100%;
}
/* The session pill is a link: 40 px tap target on touch screens */
@media (pointer: coarse), (max-width: 640px) {
  a.gn-dash-pill {
    min-height: 40px;
  }
}
a.gn-dash-pill:hover {
  background: var(--glass-strong);
}
.gn-dash-pill .icon {
  width: 15px;
  height: 15px;
}
.gn-dash-grid {
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.gn-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 18px 20px;
  padding: 20px;
}
.gn-hero-b {
  min-width: 0;
}
.gn-hero-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.gn-hero-count {
  margin-top: 2px;
  color: var(--text-2);
}
.gn-hero-count b {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.gn-hero-left {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--green-7);
  background: var(--green-1);
}
.gn-hero-left .icon {
  width: 15px;
  height: 15px;
  margin-right: 2px;
  vertical-align: -3px;
  stroke-width: 2.4;
}
.gn-kpi-chips {
  grid-column: 1 / -1;
}
.gn-kpi-chips li {
  display: flex;
  min-width: 0;
}
.gn-kpi-chips .stat-chip {
  flex: 1;
  padding-top: 7px;
  padding-bottom: 7px;
}
/* Label with its sub-line ("2 đã thanh lý", "3 đã gắn · 1 đã khóa") always visible, also on phones */
.gn-chip-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.gn-chip-t small {
  white-space: normal;
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.85;
}
/* Bars by group / by site (like the floors card of the counting screen) */
.gn-bars .card-b {
  padding-top: 8px;
}
.gn-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 10px;
  padding: 10px 2px 8px;
  color: inherit;
  border-radius: var(--r-sm);
}
.gn-bar-row + .gn-bar-row {
  border-top: 1px solid var(--line-soft);
}
.gn-bar-row:hover .gn-bar-l > .ellipsis {
  color: var(--green-6);
}
.gn-bar-row .bar {
  grid-column: 1 / -1;
  margin: 8px 0 5px;
}
.gn-bar-l {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}
.gn-bar-l .code-tag {
  flex: none;
}
.gn-bar-n {
  font-size: 15px;
  color: var(--green-7);
}
.gn-bar-s {
  grid-column: 1 / -1;
  font-size: var(--fs-sm);
  color: var(--muted);
}
/* Readiness banner = the mock's suggestion card */
.gn-ready-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  padding: 18px 20px;
  color: inherit;
}
.gn-ready-banner.is-bad {
  background: linear-gradient(115deg, var(--bad-soft), var(--glass) 65%);
}
.gn-ready-banner .gn-ready-ic {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}
.gn-ready-banner .gn-ready-ic .icon {
  width: 22px;
  height: 22px;
}
.gn-ready-t {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gn-ready-t small {
  color: var(--muted);
  font-size: var(--fs-sm);
}
.gn-ready-t .gn-ready-k {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-6);
}
.is-bad .gn-ready-t .gn-ready-k {
  color: var(--bad);
}
.gn-ready-banner .btn .icon {
  width: 16px;
  height: 16px;
}
.gn-quick {
  margin-top: 2px;
}
.gn-quick .hub-card {
  box-shadow: var(--shadow-sm);
}
/* Only quick links (no overview figures for the role): larger tiles with the brand mark */
.gn-quick.solo .hub-card {
  padding: 16px;
}
.gn-quick.solo .nic {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}
.gn-quick.solo .nic .icon {
  width: 22px;
  height: 22px;
}
@container (min-width: 700px) {
  .gn-dash-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .gn-ready-banner,
  .gn-span {
    grid-column: 1 / -1;
  }
  .gn-bars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    column-gap: 28px;
  }
  .gn-bars-grid .gn-bar-row + .gn-bar-row {
    border-top: 0;
  }
}
/* Phones: room for the chip labels ("Tổng tài sản 20") in two columns */
@media (max-width: 480px) {
  .gn-hero {
    gap: 16px 14px;
    padding: 16px;
  }
  .gn-kpi-chips .stat-chip {
    gap: 6px;
    padding: 0 10px;
    font-size: 12.5px;
  }
}
@media (max-width: 380px) {
  .gn-hero-count b {
    font-size: 26px;
  }
}

/* ---------- Screens still being built (pages/gn-soon.js) ---------- */
.gn-soon {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 18px;
  padding: 28px 20px 24px;
  text-align: center;
  background: var(--grad-soft);
  overflow: hidden;
}
.gn-soon-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
}
/* Two slow orbits with a data node each: the network motif of the background */
.gn-soon-art i {
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--ring-dots);
  border-radius: 50%;
  animation: gn-orbit 26s linear infinite;
}
.gn-soon-art i.o2 {
  inset: 20px;
  border-style: solid;
  border-color: var(--track);
  animation-duration: 18s;
  animation-direction: reverse;
}
.gn-soon-art i::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--green-4);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-4) 22%, transparent);
}
.gn-soon-art i.o2::after {
  top: -4px;
  left: 50%;
  margin: 0 0 0 -3.5px;
  width: 7px;
  height: 7px;
  background: var(--green-6);
}
.gn-soon-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 20px;
}
.gn-soon-mark .icon {
  width: 28px;
  height: 28px;
}
.gn-soon-b {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  min-width: 0;
}
.gn-soon h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.gn-soon-lead {
  color: var(--text-2);
  text-wrap: pretty;
}
.gn-soon-list {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}
.gn-soon-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--glass-strong);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.gn-soon-list .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  padding: 3px;
  box-sizing: content-box;
  border-radius: 50%;
  background: var(--green-1);
  color: var(--green-6);
  stroke-width: 2.4;
}
.gn-soon-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.gn-soon-links .row {
  justify-content: center;
}
/* Short note (no list): a smaller card */
.gn-soon.compact {
  gap: 12px;
  padding: 20px;
}
.gn-soon.compact .gn-soon-art {
  width: 104px;
  height: 104px;
}
.gn-soon.compact .gn-soon-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}
.gn-soon.compact h2 {
  font-size: 18px;
}
@keyframes gn-orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gn-soon-art i {
    animation: none;
  }
}
@media (min-width: 820px) {
  .gn-soon {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    gap: 32px;
    padding: 32px 36px;
    text-align: left;
  }
  .gn-soon-art {
    width: 168px;
    height: 168px;
  }
  .gn-soon-mark {
    width: 72px;
    height: 72px;
    border-radius: 24px;
  }
  .gn-soon-b,
  .gn-soon-links {
    align-items: flex-start;
  }
  .gn-soon.compact {
    gap: 24px;
    padding: 20px 28px;
  }
  .gn-soon.compact .gn-soon-art {
    width: 112px;
    height: 112px;
  }
  .gn-soon-links .row {
    justify-content: flex-start;
  }
}

/* ---------- Tag print preview: the page is themed, the labels stay paper ---------- */
.gn-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}
.gn-label-card {
  display: flex;
  flex-direction: column;
}
.gn-label-card .gn-tag-preview {
  flex: 1;
  align-items: center;
  margin: 14px;
  min-height: 150px;
}

/* ---------- Quét tem: viewfinder + result sheet (the mock's phone scan screen) ---------- */
.gn-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.gn-vf {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 300px;
  padding: 56px 16px 22px;
  border: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: pointer;
  color: var(--vf-ink);
  font: inherit;
  background:
    radial-gradient(70% 55% at 25% 20%, color-mix(in srgb, var(--vf-glow) 26%, transparent), transparent 70%),
    radial-gradient(60% 45% at 85% 95%, color-mix(in srgb, var(--vf-glow) 10%, transparent), transparent 70%),
    linear-gradient(165deg, var(--vf-from), var(--vf-to));
  box-shadow: var(--shadow);
}
.gn-vf:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.gn-vf-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  white-space: nowrap;
  background: var(--vf-chip);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gn-vf-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
}
.gn-vf-cam {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--vf-glow) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vf-glow) 30%, transparent);
  transition: transform 0.2s;
}
.gn-vf-cam .icon {
  width: 28px;
  height: 28px;
}
.gn-vf:hover .gn-vf-cam {
  transform: scale(1.06);
}
.gn-vf-cta {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  background: color-mix(in srgb, var(--vf-glow) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vf-glow) 32%, transparent);
}
.gn-scan-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.gn-scan-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}
.gn-scan-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.gn-scan-form input {
  letter-spacing: 0.02em;
}
.gn-scan-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 4px;
}
.gn-scan-tip .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
}
/* Result sheet: white, rounded top, a tinted halo icon in the result colour */
.gn-scan-res {
  --c: var(--ok);
  --cb: var(--ok-soft);
  padding: 10px 18px 18px;
  border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.gn-scan-res.warn {
  --c: var(--warn);
  --cb: var(--warn-soft);
}
.gn-scan-res.bad {
  --c: var(--bad);
  --cb: var(--bad-soft);
}
.gn-scan-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: var(--r-pill);
  background: var(--line-2);
}
.gn-scan-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.gn-scan-ic {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  color: var(--c);
  background: radial-gradient(circle at 35% 30%, var(--surface), var(--cb) 70%);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--c) 8%, transparent),
    0 8px 18px -10px color-mix(in srgb, var(--c) 60%, transparent);
}
.gn-scan-ic .icon {
  width: 26px;
  height: 26px;
  stroke-width: 2.4;
}
.gn-scan-t {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c);
}
.gn-scan-m {
  margin-top: 2px;
  color: var(--text-2);
  text-wrap: pretty;
}
.gn-scan-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--surface-3);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.gn-scan-tag .icon {
  width: 15px;
  height: 15px;
  color: var(--green-6);
}
@media (max-width: 1023px) {
  /* Phone: the viewfinder takes the room left above the form (like the counting screen), and shrinks once a result
     is shown so the result sheet stays in view */
  .gn-vf {
    min-height: max(260px, min(calc(100dvh - 520px), 420px));
  }
  .gn-scan.has-res .gn-vf {
    min-height: 200px;
    padding-top: 48px;
    gap: 12px;
  }
  .gn-scan.has-res .gn-vf-box {
    width: 120px;
    height: 120px;
  }
}
@media (min-width: 760px) {
  .gn-scan {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    max-width: 1040px;
  }
  .gn-vf {
    min-height: 420px;
  }
  .gn-vf-box {
    width: 200px;
    height: 200px;
  }
}
