* {
  box-sizing: border-box;
}

body {

  margin: 0;

  padding: 20px;

  background: #eef3f8;

  font-family:
    Arial,
    sans-serif;

  color: #1d2a39;
}

/* ======================================
   APP
====================================== */

.app {

  display: flex;

  gap: 28px;

  align-items: flex-start;
}

/* ======================================
   PANEL
====================================== */

.panel {

  width: 420px;

  background: white;

  border-radius: 24px;

  padding: 28px;

  box-shadow:
    0 10px 30px
    rgba(0,0,0,0.06);
}

/* ======================================
   HEADER
====================================== */

.header {

  display: flex;

  align-items: center;

  gap: 18px;

  margin-bottom: 30px;
}

.logo {

  width: 90px;

  height: auto;
}

h1 {

  margin: 0;

  color: #005fa8;

  font-size: 26px;

  line-height: 1.1;
}

.subtitle {

  margin-top: 8px;

  color: #6b7a8c;

  font-size: 14px;
}

/* ======================================
   SECTIONS
====================================== */

.section {

  margin-bottom: 24px;
}

.section > label {

  display: block;

  margin-bottom: 10px;

  font-size: 15px;

  font-weight: 700;

  color: #1d2a39;
}

/* ======================================
   GRID
====================================== */

.grid-2 {

  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 18px;
}

/* ======================================
   INPUTS
====================================== */

input,
select {

  width: 100%;

  height: 48px;

  border-radius: 14px;

  border:
    2px solid #d7e0ea;

  background: white;

  padding: 0 14px;

  font-size: 15px;

  color: #1d2a39;

  outline: none;

  transition:
    all 0.2s ease;
}

input:focus,
select:focus {

  border-color: #0083c8;

  box-shadow:
    0 0 0 4px
    rgba(0,131,200,0.12);
}

select {

  cursor: pointer;
}

/* ======================================
   DISABLED
====================================== */

input.disabled,
input:disabled {

  background: #eef2f6;

  border-color: #d7e0ea;

  color: #9aa8b7;

  cursor: not-allowed;

  opacity: 0.9;
}

/* ======================================
   BUTTON ROW
====================================== */

.button-row {

  display: flex;

  gap: 12px;

  align-items: center;
}

.button-row select {

  flex: 1;
}

/* ======================================
   BUTTONS
====================================== */

button {

  border: none;

  border-radius: 14px;

  height: 48px;

  padding: 0 18px;

  color: white;

  font-size: 15px;

  font-weight: 700;

  cursor: pointer;

  transition:
    all 0.2s ease;

  background: linear-gradient(
    135deg,
    #005fa8,
    #0083c8
  );
}

button:hover {

  transform:
    translateY(-1px);

  box-shadow:
    0 6px 18px
    rgba(0,95,168,0.25);
}

/* ======================================
   PREVIEW
====================================== */

.preview-wrapper {

  flex: 1;

  overflow: auto;
}

#previewArea {

  display: flex;

  flex-wrap: wrap;

  align-items: flex-start;

  gap: 24px;
}

/* ======================================
   LABEL
====================================== */

.label {

  position: relative;

  background: white;

  border:
    2px solid #005fa8;

  overflow: hidden;

  box-shadow:
    0 8px 24px
    rgba(0,0,0,0.08);

  flex: 0 0 auto;

  transform: scale(3);

  transform-origin: top left;

  margin-right: 120px;

  margin-bottom: 40px;
}

/* ======================================
   LABEL CONTENT
====================================== */

.label-content {

  width: 100%;

  height: 100%;

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 2mm;

  overflow: hidden;

  box-sizing: border-box;
}

/* ======================================
   TEXT
====================================== */

.label-text {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  text-align: center;

  gap: 1px;

  flex: 0 1 auto;
}

.label-title {

  margin: 0;

  font-weight: 800;

  line-height: 1.1;

  word-break: break-word;
}

.label-desc {

  opacity: 0.75;

  line-height: 1.2;

  word-break: break-word;
}

/* ======================================
   BARCODE / QR
====================================== */

.barcode-wrapper,
.qr-wrapper {

  display: flex;

  justify-content: center;

  align-items: center;

  overflow: hidden;

  max-width: 100%;

  flex-shrink: 1;
}

.barcode-wrapper svg {

  display: block;

  max-width: 100%;

  height: auto;
}

.qr-wrapper canvas {

  max-width: 100%;

  height: auto;
}

/* ======================================
   CODE TYPE
====================================== */

.code-type-group {

  display: flex;

  gap: 10px;

  flex-wrap: wrap;
}

.code-type-btn {

  display: flex;

  justify-content: center;

  align-items: center;

  flex: 1;

  min-width: 110px;

  min-height: 48px;

  padding: 0 16px;

  border-radius: 14px;

  border:
    2px solid #d7e0ea;

  background: white;

  color: #005fa8;

  font-size: 14px;

  font-weight: 700;

  cursor: pointer;

  user-select: none;

  transition:
    all 0.2s ease;
}

.code-type-btn:hover {

  border-color: #005fa8;

  background: #f4f9ff;
}

#showBarcode:checked
+ .code-type-btn,

#showQR:checked
+ .code-type-btn,

#showNone:checked
+ .code-type-btn {

  background: linear-gradient(
    135deg,
    #005fa8,
    #0083c8
  );

  border-color: #005fa8;

  color: white;

  box-shadow:
    0 6px 18px
    rgba(0,95,168,0.25);
}

/* ======================================
   PRINT
====================================== */

@media print {

  body {

    background: white;

    padding: 0;
  }

  .panel {

    display: none;
  }

  #previewArea {

    gap: 0;
  }

  .label {

    box-shadow: none;

    margin: 0;
  }
}

/* ======================================
   MOBILE
====================================== */

@media (
  max-width: 1100px
) {

  .app {

    flex-direction: column;
  }

  .panel {

    width: 100%;
  }
}

@media (
  max-width: 600px
) {

  .grid-2 {

    grid-template-columns:
      1fr;
  }

  .button-row {

    flex-direction: column;
  }

  .code-type-group {

    flex-direction: column;
  }
}