body {
  font-family: Arial;
  margin: 0;
  background: #f5f6fa;
}

/* HEADER */
.header {
  background: #000;
  color: #FFD700;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.sub-header {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  margin: 10px 0;
}

/* INPUT */
.container {
  display: flex;
  gap: 20px;
  padding: 0 20px;
}

textarea {
  width: 45%;
  height: 140px;
  padding: 10px;
}

/* BUTTONS */
.controls {
  text-align: center;
  margin: 15px;
}

button {
  padding: 10px 20px;
  margin: 5px;
  border: none;
  background: #000;
  color: #FFD700;
  font-weight: bold;
  cursor: pointer;
}

/* PAGE */
.page {
  width: 210mm;
  min-height: 297mm;
  padding: 12mm 10mm;
  box-sizing: border-box;
  background: white;
  margin: 0 auto;
}

/* ROW */
.row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12mm;
}

/* LABEL */
.label {
  width: 48%;
  min-height: 45mm;
  border: 3px solid #000;
  padding: 6px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* TITLE */
.label-title {
  font-size: 12px;
  font-weight: bold;
  width: 100%;
}

/* BARCODE */
.barcode-box {
  width: 100%;
  text-align: center;
}

canvas {
  display: block;
  margin: auto;
}

/* TEXT */
.label-text {
  font-size: 13px;
  font-weight: bold;
}

/* 🔥 PRINT FIX */
@media print {

  body {
    background: white;
  }

  .header,
  .sub-header,
  .container,
  .controls,
  hr {
    display: none;
  }

  .page {
    page-break-after: always;
  }

  .row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    page-break-inside: avoid;
  }

  .label {
    width: 48% !important;
  }

  canvas {
    image-rendering: pixelated;
  }
}