.supplier-label-page {
  background: #f4f7fb;
  color: #18263a;
}

.supplier-label-page main {
  max-width: 1320px;
}

.supplier-access-card {
  max-width: 34rem;
}

.packing-calculation {
  border-left: 4px solid #0d6efd;
}

.delivery-item {
  background: #fff;
}

.delivery-item + .delivery-item {
  margin-top: 1rem;
}

.labels-output {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1rem;
  align-items: start;
}

.print-sheet-output,
.print-roll-output {
  display: none;
}

.sheet-layout-status {
  min-height: 1.25rem;
  padding-top: 0.35rem;
  font-weight: 600;
}

.supply-label {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22mm;
  gap: 1.5mm;
  width: 60mm;
  height: 40mm;
  max-width: 100%;
  overflow: hidden;
  padding: 2mm;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #101820;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2.45mm;
  line-height: 1.15;
  box-shadow: none;
}

.supply-label-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.supply-label-kicker {
  margin-bottom: 0.7mm;
  overflow: hidden;
  color: #075ebc;
  font-weight: 800;
  font-size: 2.05mm;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.supply-label-product {
  max-height: 7.3mm;
  overflow: hidden;
  font-size: 3.15mm;
  font-weight: 800;
  line-height: 1.12;
}

.supply-label-spec {
  margin-top: 0.45mm;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #26384e;
  font-size: 2.25mm;
}

.supply-label-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.45mm 1mm;
  margin-top: 1.1mm;
  padding-top: 0.8mm;
  border-top: 0.2mm solid #b9c6d6;
  font-size: 2.15mm;
}

.supply-label-grid span,
.supply-label-grid b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.supply-label-grid span {
  color: #475b73;
}

.supply-label-grid b {
  display: block;
  color: #101820;
  font-size: 2.55mm;
}

.supply-label-meta {
  margin-top: auto;
  padding-top: 0.7mm;
  overflow: hidden;
  border-top: 0.2mm solid #d6dee8;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 2.05mm;
  font-weight: 700;
}

.supply-label-code {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.supply-label-qr {
  display: block;
  width: 20mm;
  height: 20mm;
}

.supply-label-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.supply-label-inner .supply-label-code {
  justify-content: flex-start;
}

.supply-label-inner .supply-label-qr {
  width: 14mm;
  height: 14mm;
}

.supply-label-ean {
  width: 20mm;
  height: 5.2mm;
  margin-top: 0.7mm;
}

.supply-label-ean svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #000;
}

.supply-label-code small {
  display: block;
  width: 20mm;
  margin-top: 0.75mm;
  overflow: hidden;
  color: #172b4d;
  font-size: 1.85mm;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.qr-unavailable {
  display: grid;
  width: 20mm;
  height: 20mm;
  place-items: center;
  color: #8a1723;
  font-size: 2mm;
  font-weight: 700;
}

@media (max-width: 767.98px) {
  .labels-output {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x proximity;
  }

  .supply-label {
    flex: 0 0 60mm;
    scroll-snap-align: start;
  }
}

@media print {
  html,
  body.supplier-label-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body[data-print-format="sheet"] > *:not(.print-sheet-output),
  body[data-print-format="roll"] > *:not(.print-roll-output) {
    display: none !important;
  }

  body[data-print-format="sheet"] > .print-sheet-output {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-sheet {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(var(--sheet-cols), 60mm);
    grid-template-rows: repeat(var(--sheet-rows), 40mm);
    column-gap: var(--sheet-gap-x);
    row-gap: var(--sheet-gap-y);
    width: var(--sheet-width);
    height: var(--sheet-height);
    overflow: hidden;
    padding-top: var(--sheet-top);
    padding-left: var(--sheet-left);
    break-after: page;
    page-break-after: always;
  }

  .print-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-sheet .supply-label,
  .print-label-empty {
    width: 60mm !important;
    height: 40mm !important;
    margin: 0 !important;
    break-after: auto;
    break-inside: avoid;
    page-break-after: auto;
    page-break-inside: avoid;
  }

  .print-sheet .supply-label {
    break-after: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .print-label-empty {
    visibility: hidden;
  }

  body[data-print-format="roll"] > .print-roll-output {
    display: block !important;
    width: 60mm !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .print-roll-label {
    width: 60mm;
    height: 40mm;
    margin: 0;
    padding: 0;
    overflow: hidden;
    break-after: page;
    page-break-after: always;
  }

  .print-roll-label:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-roll-label .supply-label {
    width: 60mm !important;
    height: 40mm !important;
    margin: 0 !important;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
