/* Physical dimensions are shared by preview and print. Scale only the preview's outer paper. */
body.lab-shell.se-site > #barcode-print-root { display: none; }

body.lab-shell.se-site .bc-a4-page {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 16mm 248mm 8mm;
  gap: 0;
  width: 186mm;
  min-width: 186mm;
  max-width: 186mm;
  height: 272mm;
  min-height: 272mm;
  max-height: 272mm;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #000;
  font-family: Arial, SamEggTC, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 9pt;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: left;
  color-scheme: light;
  overflow: visible;
  break-inside: avoid;
  page-break-inside: avoid;
}

body.lab-shell.se-site .bc-a4-page * { box-sizing: border-box; }
body.lab-shell.se-site .bc-a4-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4mm;
  min-width: 0;
  padding: 0 0 2mm;
}
body.lab-shell.se-site .bc-a4-page .bc-a4-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #000;
  font-family: inherit;
  font-size: 12pt;
  font-weight: 700;
  line-height: 4.8mm;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: anywhere;
}
body.lab-shell.se-site .bc-a4-meta {
  flex: none;
  margin: 0;
  color: #000;
  font-size: 9pt;
  line-height: 4.8mm;
  white-space: nowrap;
}
body.lab-shell.se-site .bc-a4-items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(5, 48mm);
  column-gap: 4mm;
  row-gap: 2mm;
  align-content: start;
  width: 186mm;
  height: 248mm;
  min-width: 0;
  margin: 0;
  padding: 0;
}
body.lab-shell.se-site .bc-a4-page[data-columns="2"] .bc-a4-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.lab-shell.se-site .bc-a4-label {
  display: grid;
  grid-template-rows: 12mm 29mm;
  row-gap: 1mm;
  align-content: start;
  min-width: 0;
  height: 48mm;
  margin: 0;
  padding: 2.5mm;
  border: .2mm solid #000;
  border-radius: 0;
  background: #fff;
  color: #000;
  overflow: visible;
  break-inside: avoid;
  page-break-inside: avoid;
}
body.lab-shell.se-site .bc-a4-name {
  min-width: 0;
  height: 12mm;
  margin: 0;
  padding: 0;
  color: #000;
  font-size: 9pt;
  font-weight: 400;
  line-height: 3.8mm;
  letter-spacing: normal;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  overflow: visible;
}
body.lab-shell.se-site .bc-a4-code {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 29mm;
  margin: 0;
  padding: 0;
  background: #fff;
  overflow: visible;
}
body.lab-shell.se-site .bc-a4-code > svg {
  display: block;
  flex: none;
  max-width: none !important;
  max-height: none !important;
  margin: 0;
  padding: 0;
  border: 0;
  transform: none !important;
  filter: none !important;
}
body.lab-shell.se-site .bc-a4-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #000;
  font-size: 9pt;
  line-height: 4mm;
}

@page { size: A4 portrait; margin: 12mm; }

@media print {
  html,
  body.lab-shell.se-site {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    background-image: none !important;
    color: #000 !important;
    color-scheme: light !important;
    transform: none !important;
    filter: none !important;
  }
  body.lab-shell.se-site > :not(#barcode-print-root) { display: none !important; }
  body.lab-shell.se-site > #barcode-print-root {
    display: block !important;
    position: static !important;
    width: 186mm !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    color: #000 !important;
    transform: none !important;
    filter: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.lab-shell.se-site > #barcode-print-root .bc-a4-page {
    margin: 0 !important;
    box-shadow: none !important;
    break-after: page;
    page-break-after: always;
  }
  body.lab-shell.se-site > #barcode-print-root .bc-a4-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
