:root{font-family:"Segoe UI",Tahoma,sans-serif;color:#1b1d22;background:#f3f4f5;font-synthesis:none;--label-width:33mm;--label-height:59mm;--safe-left:15.362%;--safe-top:19.187%;--safe-right:15.368%;--safe-bottom:5mm}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;background:#191b20;color:#fff;border:1px solid #191b20;border-radius:8px;padding:12px 15px;font-weight:700}button:hover{background:#363940}button:disabled{opacity:.45;cursor:default}.secondary{background:#fff;color:#25282d;border-color:#cdd0d5}.secondary:hover{background:#eceef0}.topbar{height:77px;display:flex;justify-content:space-between;align-items:center;padding:0 36px;background:#15171b;color:#fff;gap:20px}.brand{display:flex;align-items:center;gap:12px;font-size:17px;font-weight:900;font-style:italic}.brand-mark{display:grid;place-items:center;width:38px;height:38px;transform:skew(-10deg);background:#fff;color:#15171b}.brand small{display:block;font-size:9px;letter-spacing:.25em;font-style:normal;color:#aeb2ba;margin-top:5px}.status{font-size:13px;color:#c6c9cf}.workspace{display:grid;grid-template-columns:340px minmax(0,1fr);min-height:calc(100vh - 77px);max-width:1800px;margin:auto}.workspace.editing{grid-template-columns:320px minmax(440px,1fr) 350px}.editor,.information-panel{background:#fff;padding:34px 28px}.editor{border-right:1px solid #dedfe2}.information-panel{border-left:1px solid #dedfe2}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.15em;color:#797e86}h1{font-size:29px;letter-spacing:-.045em;margin:12px 0 10px}h2{font-size:23px;margin:12px 0 0;letter-spacing:0;font-kerning:none}h3{font-size:23px;margin:0 0 12px}.intro,.panel-intro{font-size:14px;color:#737780;line-height:1.5;margin:0 0 25px}label{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:700;margin:0 0 8px}label span{font-size:12px;font-weight:400;color:#737780}input,select,textarea{width:100%;border:1px solid #cdd0d5;border-radius:8px;background:#fff;color:#17191e;padding:12px;margin:0 0 18px;outline:none;min-width:0}input:focus,select:focus,textarea:focus{border-color:#17191e;box-shadow:0 0 0 3px #17191e14}textarea{resize:vertical;line-height:1.4}input[readonly]{background:#f3f4f5;color:#626770}.field-help{font-size:12px;color:#737780;line-height:1.5;margin:-8px 0 18px}.label-actions{display:flex;gap:8px}.label-actions button{padding:11px;font-size:12px;flex:1}.divider{height:1px;background:#e6e7e9;margin:26px 0}.quantity-button{background:#fff;color:#191b20;width:100%}.quantity-button:hover{background:#f3f4f5}.quantity-summary{margin:14px 0 26px}.quantity-empty{font-size:13px;color:#737780}.quantity-list{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}.quantity-list li{display:flex;justify-content:space-between;gap:10px;background:#f3f4f5;padding:9px 10px;border-radius:6px;font-size:13px}.quantity-total{font-size:13px;font-weight:700;margin:12px 0 0}.print-button{width:100%;display:flex;align-items:center;justify-content:space-between;padding:16px}.print-button span{font-size:22px}.print-note,.storage-status{font-size:12px;color:#737780;line-height:1.6}.storage-status{border-top:1px solid #e6e7e9;padding-top:12px}.preview-area{padding:34px 28px;min-width:0}.preview-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:22px}.dimension{font-size:12px;color:#777c84;white-space:nowrap}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;font-size:12px;color:#737780}.margin-toggle{margin:0;display:flex;justify-content:flex-start;align-items:center;font-size:12px;font-weight:400}.margin-toggle input{width:auto;margin:0;accent-color:#191b20}.preview-stage{background:#e9ebed;border:1px solid #e0e2e5;border-radius:14px;min-height:510px;display:flex;align-items:center;justify-content:center;overflow:auto;padding:32px 16px;background-image:radial-gradient(#c7cacf 1px,transparent 1px);background-size:18px 18px}.label-row{display:flex;flex:none;box-shadow:0 14px 38px #15171b25}.label-sheet{width:var(--label-width);height:var(--label-height);background:#fff;color:#111;position:relative;flex:none;overflow:hidden;font-family:Arial,Helvetica,sans-serif}.label-sheet+.label-sheet{border-left:.2px solid #ddd}.label-safe{position:absolute;left:var(--safe-left);right:var(--safe-right);top:var(--safe-top);bottom:var(--safe-bottom);background:#fff;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.label-content{width:100%;display:flex;flex-direction:column;align-items:center;gap:1.8mm;text-align:center;transform-origin:center bottom;flex:none}.label-company{width:100%;font-size:3mm;font-weight:800;line-height:1.08;white-space:pre-line;overflow-wrap:anywhere}.label-cnpj{font-size:2.3mm;font-weight:700;line-height:1.15;white-space:pre-line;overflow-wrap:anywhere;margin-top:.6mm}.label-composition{width:100%;font-size:2.8mm;font-weight:700;line-height:1.15;white-space:pre-line;overflow-wrap:anywhere}.label-icons{display:flex;align-items:center;justify-content:center;gap:.7mm;width:100%;height:5mm}.label-icons img{max-height:5mm;max-width:100%;height:100%;object-fit:contain;min-width:0;width:auto;flex:0 1 auto}.label-country{font-size:2.45mm;font-weight:700;line-height:1.1;white-space:nowrap}.label-size{font-size:5mm;font-weight:800;line-height:1;width:100%;white-space:nowrap}.label-size.long{font-size:3.8mm}.preview-foot,.layout-message{font-size:12px;color:#737780;line-height:1.6;margin:17px 0 0}.layout-message.error,.form-error{color:#ad2730}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:18px}.panel-heading h2{font-size:22px}.icon-button{font-size:24px;line-height:1;background:#fff;color:#626770;border:0;padding:0 4px}.panel-intro{margin-bottom:22px}.information-panel input[type=file]{padding:10px;font-size:12px}.icon-list{display:flex;flex-direction:column;gap:8px;margin:0 0 18px}.icon-item{display:flex;align-items:center;gap:8px;padding:9px;background:#f3f4f5;border-radius:7px}.icon-item img{width:75px;height:24px;object-fit:contain;background:#fff}.icon-item span{font-size:11px;flex:1;overflow-wrap:anywhere}.icon-item button{font-size:11px;padding:6px;background:#fff;color:#25282d;border-color:#cdd0d5}.spacing-note{font-size:12px;line-height:1.5;color:#737780}.panel-actions,.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.panel-actions button{font-size:12px;padding:12px}.form-error{font-size:12px;line-height:1.5;min-height:0}dialog{width:min(680px,calc(100vw - 32px));max-height:85vh;border:0;border-radius:14px;padding:28px;overflow:auto;box-shadow:0 20px 80px #0003}dialog::backdrop{background:#0008}dialog p{color:#737780;font-size:14px;line-height:1.5}.size-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px 12px;margin:22px 0}.size-field label{display:block;text-align:center;font-size:13px}.size-field input{text-align:center;padding:10px 6px;margin:0}#print-confirm-dialog{max-width:430px}#print-pages{display:none}[hidden]{display:none!important}
@media(min-width:1400px){.preview-stage{min-height:580px}.label-row{zoom:1.3}}@media(max-width:1150px){.workspace.editing{grid-template-columns:280px minmax(0,1fr)}.workspace.editing .information-panel{grid-column:1/-1;border-top:1px solid #dedfe2}.information-panel form{max-width:660px}}@media(max-width:700px){.topbar{padding:18px;height:auto;align-items:flex-start}.status{max-width:125px;text-align:right;line-height:1.5}.workspace,.workspace.editing{display:flex;flex-direction:column}.editor,.preview-area,.information-panel{padding:26px 20px}.preview-stage{min-height:360px;justify-content:flex-start}.label-row{margin:auto}.preview-heading{align-items:flex-start}.dimension{font-size:10px}.information-panel{order:2}.preview-area{order:1}.editor{order:0}}@media(max-width:550px){.size-grid{grid-template-columns:repeat(3,minmax(0,1fr))}dialog{padding:22px}}
@page{size:99mm 59mm;margin:0}@media print{html,body{width:99mm;margin:0!important;padding:0!important;background:#fff}.app,dialog{display:none!important}#print-pages{display:block}.print-page{display:flex;width:99mm;height:59mm;overflow:hidden;break-after:page;page-break-after:always}.print-page:last-child{break-after:auto;page-break-after:auto}.label-sheet{border:0!important;width:33mm;height:59mm;print-color-adjust:exact;-webkit-print-color-adjust:exact}.label-sheet::before{display:none!important}.label-safe{background:#fff}}
.label-fabric{width:100%;font-size:2.8mm;font-weight:900;line-height:1.15;text-align:center;white-space:pre-line;overflow-wrap:anywhere}

.spacing-control{margin:20px 0 10px;padding:16px;background:#f3f4f5;border-radius:8px}.spacing-control label{align-items:center;flex-wrap:wrap}.spacing-control output{font-size:12px;white-space:nowrap;color:#626770}.spacing-control input[type=range]{padding:0;margin:8px 0 12px;accent-color:#191b20;border:0;box-shadow:none}.spacing-control button{padding:7px 10px;font-size:11px}

#quantity-confirm-dialog{max-width:460px}

.label-icons{height:var(--icon-height,5mm)}.label-icons img{max-height:var(--icon-height,5mm)}

/* Keep editing fields within the screen, with actions always accessible. */
@media screen {
  .information-panel{height:calc(100vh - 77px);height:calc(100dvh - 77px);align-self:start;display:flex;flex-direction:column;overflow:hidden}
  .information-panel .panel-heading,.information-panel .panel-intro{flex-shrink:0}
  #information-form{display:flex;flex-direction:column;flex:1;min-height:0}
  .information-fields{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:3px 6px 3px 3px}
  .information-panel .panel-actions{flex-shrink:0;padding-top:14px;border-top:1px solid #e6e7e9;margin-top:14px}
}
@media screen and (max-width:1150px){.information-panel{height:80vh;height:80dvh}}

/* Anchor the content explicitly for identical screen and print placement. */
.label-safe{display:block}
.label-content{position:absolute;left:0;bottom:0;width:100%;transform:none}
.label-cnpj,.label-country{width:100%}
.label-text-line{display:block;width:max-content;max-width:none;white-space:pre;transform-origin:left center}

.label-company-group{align-self:stretch;min-width:0}

.font-control{margin:-8px 0 20px;border:1px solid #dedfe2;border-radius:8px;font-size:12px}.font-control summary{display:flex;align-items:center;gap:8px;padding:10px;cursor:pointer;list-style:none}.font-control summary::-webkit-details-marker{display:none}.font-control output{margin-left:auto;color:#626770;white-space:nowrap}.font-chevron{font-size:21px;line-height:1;transition:transform .15s}.font-control[open] .font-chevron{transform:rotate(90deg)}.font-control-body{padding:0 12px 12px}.font-control input[type=range]{padding:0;margin:8px 0 12px;accent-color:#191b20}.font-control button{font-size:11px;padding:7px 10px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

.danger{background:#ad2730;border-color:#ad2730;color:#fff}.danger:hover{background:#8e2027;border-color:#8e2027}.delete-actions{flex-shrink:0;margin-top:14px}.delete-actions button{width:100%;padding:10px;font-size:12px}#delete-label-dialog{max-width:460px}

.label-care{width:100%;display:flex;align-items:center;gap:.6mm;min-width:0}.label-care .label-icons{width:64%;flex:0 0 64%;min-width:0}.label-care .label-country{width:auto;flex:1;min-width:0;line-height:1.08}.label-care .label-country .label-text-line{transform-origin:left center}

.label-care{gap:.5mm}.label-care .label-country{order:0;flex:0 0 47%;width:47%;white-space:nowrap}.label-care .label-icons{order:1;flex:1 1 0;width:auto}.label-care .label-country .label-text-line{white-space:nowrap}

.label-company-logo{display:block;max-width:100%;height:auto;margin:0 auto;object-fit:contain;}
