#preview-section {
    padding-bottom: 48px;
}

#preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#preview[hidden],
#preview-empty[hidden] {
    display: none;
}

.preview-scaler {
    transform-origin: top center;
}

.page {
    position: relative;
    width: 210mm;
    height: 297mm;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.page-number {
    position: absolute;
    top: 2mm;
    right: 4mm;
    z-index: 1;
    color: #888;
    font-size: 9pt;
}

.page-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 5mm;
    justify-content: flex-start;
    gap: 2mm;
}

.label-row {
    display: flex;
    flex-shrink: 0;
    gap: 2mm;
}

.label {
    display: flex;
    flex-shrink: 0;
    align-items: center; /* Centraliza verticalmente o conteúdo interno */
    width: 100mm;
    padding: 3mm;
    gap: 3mm;
    break-inside: avoid;
    page-break-inside: avoid;
    box-sizing: border-box;
}

.page .label {
    outline: 0.3mm dashed #bbb;
}

.label-logo-col {
    display: flex;
    flex: 0 0 26mm;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5mm;
    text-align: center;
}

.label-logo {
    max-width: 24mm;
    max-height: 10mm;
    object-fit: contain;
}

.label-divider {
    flex: 0 0 0;
    align-self: stretch;
    border-left: 1.5px dotted #2c669d;
    margin: 1mm 0;
}

.label-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.label-body {
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.label-nome {
    margin-bottom: 1mm;
    font-size: 11pt;
    font-weight: 750;
    line-height: 1.15;
    color: #111;
}

.label-telefone {
    font-size: 8pt;
    line-height: 1.1;
    color: #444;
}

.label-contato {
    margin-bottom: 1mm;
    font-size: 9pt;
    line-height: 1.2;
    color: #333;
}

.label-local {
    margin-bottom: 1.5mm;
    font-size: 8.5pt;
    font-weight: 600;
    line-height: 1.2;
    color: #222;
}

.label-embalagem {
    margin-top: 1mm;
    font-size: 9.5pt;
    font-weight: bold;
    line-height: 1.2;
    color: #000;
    background: #f0f0f0; /* Fundo subtil opcional para destacar caixas */
    padding: 1mm 2mm;
    border-radius: 2px;
    display: inline-block;
}

.label-qr {
    width: 18mm;
    height: 18mm;
    object-fit: contain;
}

@media screen and (max-width: 900px) {
    .preview-scaler {
        transform: scale(0.55);
        margin-bottom: -130mm;
    }
}