/* ==========================================================================
   GreenNature 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: 6.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;
}
.gn-label-big {
  font-size: var(--big-fs);
  font-weight: 800;
  letter-spacing: -0.02em;
  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: 9mm;
  --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: 4.4mm;
  --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.5mm;
  --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;
}
