.product-extras{display:grid;gap:12px;margin-bottom:16px}.product-photo-editor{display:flex;align-items:center;gap:16px}.product-photo-editor small{display:block;margin-top:8px;color:var(--text-secondary)}.product-photo{width:92px;height:92px;object-fit:contain;border-radius:16px;background:var(--surface-field);border:1px solid var(--line)}.product-thumb{width:56px;height:56px;object-fit:contain;float:left;margin:0 12px 8px 0;border-radius:12px;background:var(--surface-field)}.photo-upload{display:inline-flex!important;cursor:pointer;position:relative;overflow:hidden}.photo-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.barcode-types{display:flex;gap:8px;flex-wrap:wrap}.barcode-types button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--text-link);color:var(--text-link)}.barcode-entry{display:flex;align-items:center;gap:8px}.barcode-entry input{min-width:0;flex:1}.barcode-entry .icon{width:22px;height:22px}.product-tool video{width:100%;max-height:320px;border-radius:16px;background:#111}.product-tool p{font-size:13px}.barcode-note{color:var(--text-secondary)}.label-controls{display:grid;gap:12px;margin:18px 0;font-size:13px}.label-controls input[type=number]{width:100px;display:block;padding:8px;border-radius:10px;border:1px solid var(--line);background:var(--surface-field);color:var(--text-primary)}.label-preview{overflow:auto;padding:16px;background:var(--surface-field);border-radius:16px}.product-label{width:50mm;height:30mm;padding:2mm;box-sizing:border-box;background:#fff;color:#000;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:1mm;overflow:hidden;font:10pt Arial,sans-serif;text-align:center}.product-label strong{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:9pt}.product-label svg{width:100%;min-height:0;flex:1;max-height:21mm}.product-label span{font-size:11pt;font-weight:bold}.roll40 .product-label{width:40mm;height:30mm}.roll60 .product-label{width:60mm;height:40mm}.a4 .product-label{width:63.5mm;height:33.9mm}#product-label-print{display:none}
@page product40{size:40mm 30mm;margin:0}@page product50{size:50mm 30mm;margin:0}@page product60{size:60mm 40mm;margin:0}@page productA4{size:A4;margin:0}
@media print{body.printing-product-labels>*{display:none!important}body.printing-product-labels #product-label-print{display:block!important;position:absolute;inset:0;background:#fff}body.printing-product-labels dialog{display:none!important}body.printing-product-labels{background:#fff!important;overflow:visible!important;padding:0!important;margin:0!important}#product-label-print .label-page{break-after:page;margin:0;padding:0}#product-label-print .label-page:last-child{break-after:auto}#product-label-print.roll40 .label-page{page:product40;width:40mm;height:30mm}#product-label-print.roll50 .label-page{page:product50;width:50mm;height:30mm}#product-label-print.roll60 .label-page{page:product60;width:60mm;height:40mm}#product-label-print.a4 .label-page{page:productA4;width:210mm;height:297mm;box-sizing:border-box;padding:12.9mm 7.25mm;display:grid;grid-template-columns:repeat(3,63.5mm);grid-template-rows:repeat(8,33.9mm);column-gap:2.5mm;row-gap:0}.product-label{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
.barcode-summary{width:100%;display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--surface-field);color:var(--text-primary);text-align:left;font:inherit;cursor:pointer;transition:background .16s,border-color .16s}.barcode-summary:hover{background:var(--surface-hover)}.barcode-summary:active{background:var(--surface-pressed)}.barcode-summary:focus-visible{outline:2px solid var(--text-link);outline-offset:3px}.barcode-summary-icon{width:40px;height:40px;flex-shrink:0;border-radius:12px;display:grid;place-items:center;background:var(--accent-soft);color:var(--text-link)}.barcode-summary .icon{width:20px;height:20px;flex-shrink:0}.barcode-summary-copy{display:grid;gap:5px;flex:1;min-width:0}.barcode-summary-copy strong{font-size:13px}.barcode-summary-copy small{font-size:12px;color:var(--text-secondary);overflow-wrap:anywhere}.barcode-summary-action{font-size:12px;color:var(--text-link)}.barcode-panel .barcode-methods{display:grid;gap:10px;margin-bottom:24px}.barcode-methods button{text-align:left;justify-content:flex-start}.barcode-methods button[aria-pressed=true]{background:var(--accent-soft);color:var(--text-link);border-color:var(--text-link)}.barcode-panel p{font-size:13px;line-height:1.6}.barcode-manual label{display:block;font-size:13px;margin-top:18px}.barcode-draft{display:block;box-sizing:border-box;width:100%;padding:14px;margin-top:8px;background:var(--surface-field);color:var(--text-primary);border:1px solid var(--line);border-radius:14px;font:inherit;--field-fill:var(--surface-field)}.barcode-draft:focus{outline:2px solid var(--text-link);outline-offset:2px}.barcode-save-hint{color:var(--text-secondary);margin-top:26px}.barcode-panel .customer-dialog-actions{flex-wrap:wrap}.barcode-panel .start-scan{display:inline-flex;gap:8px;align-items:center}.barcode-panel .start-scan .icon{width:20px;height:20px}.barcode-scan-value{overflow-wrap:anywhere}@media(max-width:600px){.barcode-draft{font-size:16px}.barcode-summary{gap:9px;padding:12px}.barcode-summary-action{font-size:11px}}@media(prefers-reduced-motion:reduce){.barcode-summary{transition:none}}
.product-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.product-links>.barcode-summary,.product-supplier>.barcode-summary{min-height:98px;height:100%;gap:10px;padding:14px}.product-supplier{min-width:0}.product-links .barcode-summary-icon{width:34px;height:34px}.product-links .barcode-summary-action{display:none}.product-links .part-supplier-current{margin:0;font-size:12px;font-weight:400;line-height:1.4}.product-links .barcode-summary-copy small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-unlink{border:0;background:transparent;color:var(--text-secondary);font:inherit;font-size:12px;padding:8px 4px;cursor:pointer;border-radius:8px}.product-unlink:hover{background:var(--surface-hover);color:var(--text-link)}.product-unlink:focus-visible{outline:2px solid var(--text-link);outline-offset:2px}.product-photo-editor{padding:16px;gap:20px;border:1px solid var(--line);border-radius:22px;background:var(--surface-field)}.photo-tile{position:relative;display:grid!important;place-items:center;width:104px;height:104px;flex:0 0 104px;border:1px dashed var(--text-subtle);border-radius:18px;overflow:hidden;background:var(--accent-soft);cursor:pointer;transition:background .16s,border-color .16s}.photo-tile:hover{background:var(--surface-hover);border-color:var(--text-link)}.photo-tile:focus-within{outline:2px solid var(--text-link);outline-offset:3px}.photo-tile input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer}.photo-placeholder{color:var(--text-link);display:grid;place-items:center}.photo-placeholder .icon{width:32px;height:32px}.photo-tile .product-photo{width:100%;height:100%;border:0;border-radius:0;object-fit:contain}.photo-tile:has(img:not([hidden])){border-style:solid;background:var(--surface-field)}.photo-tile:has(img:not([hidden])) .photo-placeholder{display:none}.photo-details{min-width:0;flex:1}.photo-details>strong{font-size:14px;font-weight:600}.photo-details>small{font-size:11px;line-height:1.5}.photo-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}.photo-actions .glass-button{font-size:12px;padding:9px 14px}.product-extras{margin-bottom:0}.product-links .barcode-summary:disabled,.photo-actions button:disabled{cursor:default}@media(max-width:540px){.product-links{grid-template-columns:minmax(0,1fr);gap:12px}.product-links>.barcode-summary,.product-supplier>.barcode-summary{min-height:80px}.product-photo-editor{padding:12px;gap:12px}.photo-tile{width:80px;height:88px;flex-basis:80px}.photo-actions{gap:6px}.photo-actions .glass-button{padding:8px 10px}}@media(prefers-reduced-motion:reduce){.photo-tile{transition:none}}

.label-dialog{width:620px}.label-dialog h2{font-size:23px}.label-dialog .label-item-name{margin:10px 0 24px;color:var(--text-secondary);line-height:1.5}
.label-dialog h3{font-size:12px;font-weight:600;margin:20px 0 10px;color:var(--text-primary)}
.label-models{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.label-models button{padding:12px 8px;border-radius:13px;font-size:12px;box-shadow:none;background:var(--surface-field);border:1px solid var(--line)}.label-models button:last-child{grid-column:1/-1}.label-models button:hover{background:var(--surface-hover)}
.label-dialog .label-controls{grid-template-columns:1fr 1fr;align-items:start;gap:16px;margin:22px 0}
.label-controls>label{font-size:11px;line-height:1.5;color:var(--text-secondary)}
.label-dialog .label-controls input[type=number]{width:100%;padding:12px;margin-top:7px;font:inherit;font-size:14px}
.label-dialog .label-price-option{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;margin-top:23px;min-height:44px;border:1px solid var(--line);background:var(--surface-field);border-radius:12px;cursor:pointer}
.label-dialog .label-price-option input{width:18px;height:18px;margin:0;accent-color:var(--text-link)}
.label-offset-field{grid-column:1/-1}.label-offset-field small{display:block;margin-top:6px;font-weight:400}.label-dialog .label-offset-field input{max-width:130px}
.label-dialog .label-preview{display:flex;justify-content:center;align-items:center;min-height:180px;border:1px solid var(--line);padding:20px}
.label-preview .product-label{flex-shrink:0;box-shadow:0 3px 12px #00000012}
.label-dialog .label-print-hint{font-size:11px;line-height:1.6;color:var(--text-secondary);margin:12px 0 0}
@media(max-width:420px){.label-models{grid-template-columns:1fr 1fr}.label-models button:last-child{grid-column:auto}.label-dialog .label-controls{grid-template-columns:1fr}.label-dialog .label-price-option{margin-top:0}.label-dialog .customer-dialog-actions{flex-wrap:wrap}.label-dialog .label-preview{justify-content:flex-start;padding:12px}}

/* Identical physical layout in preview and print. Keep barcode quiet zones intact. */
.product-label{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:6mm 12mm 3mm;gap:.5mm;align-content:center;justify-content:stretch;align-items:center;justify-items:center;padding:2mm}
.product-label.has-price{grid-template-rows:6mm minmax(0,1fr) 3mm 4mm;align-content:stretch}
.product-label strong{width:100%;font-size:8pt;line-height:3mm;max-height:6mm;white-space:normal;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-align:center}
.label-barcode-art{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
.product-label .label-barcode-art svg{display:block;width:100%;height:100%;max-height:none;flex:none}
.product-label .label-barcode-number{font:7pt/3mm monospace;letter-spacing:.15mm;white-space:nowrap;max-width:100%}
.product-label .label-price{font:bold 11pt/4mm Arial,sans-serif;white-space:nowrap}
.roll60 .product-label strong,.a4 .product-label strong{font-size:9pt}

/* Label setup: grouped controls and a separate paper preview. */
:root dialog.label-dialog{width:800px}
:root dialog.label-dialog .customer-dialog-header{margin:0;padding-bottom:14px;border-bottom:1px solid var(--line);align-items:flex-start}
:root dialog.label-dialog .label-item-name{margin:6px 0 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.label-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.label-settings{display:grid;gap:18px;min-width:0}
.label-section{display:grid;gap:10px;min-width:0}
:root dialog.label-dialog h3{margin:0;font-size:12px;font-weight:600;line-height:1.5;color:var(--text-primary)}
:root dialog.label-dialog .label-models{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
:root dialog.label-dialog .label-models button{grid-column:auto;min-height:48px;padding:9px;font-size:12px;line-height:1.4;white-space:normal}
:root dialog.label-dialog .label-models button[aria-pressed=true]{border-color:var(--text-link);background:var(--accent-soft);color:var(--text-link);font-weight:600}
:root dialog.label-dialog .label-controls{grid-template-columns:minmax(0,1fr);gap:10px;margin:0}
:root dialog.label-dialog .label-controls>label{margin:0}
:root dialog.label-dialog .label-controls input[type=number]{margin-top:6px;min-height:44px;box-sizing:border-box}
:root dialog.label-dialog .label-price-option{margin:0;min-height:44px;padding:10px 12px}
.label-preview-panel{display:grid;gap:10px;min-width:0;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface-field)}
:root dialog.label-dialog .label-preview{min-height:180px;padding:8px 0;border:0;border-radius:0;background:transparent;justify-content:safe center}
:root dialog.label-dialog .label-print-hint{margin:0;font-size:11px;line-height:1.6}
@media(max-width:700px){.label-layout{grid-template-columns:minmax(0,1fr);gap:16px}.label-settings{gap:14px}.label-preview-panel{padding:12px}:root dialog.label-dialog .label-preview{min-height:150px}}
@media(max-width:420px){.label-dialog .label-preview .product-label{zoom:.85}}
@media(max-width:360px){.label-dialog .label-preview .product-label{zoom:.75}}

/* Center the empty-photo icon over the complete tile, independent of hidden media. */
.product-photo-editor>.photo-tile{padding:0;box-sizing:border-box}
.photo-tile>.photo-placeholder{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.photo-tile>.product-photo[hidden]{display:none!important}
