.receipt-layout-editor{position:fixed;inset:0;z-index:100000;background:#0f172ad6;display:grid;place-items:center;padding:12px;color:#172554}.receipt-layout-editor .invoice-marker-panel{width:min(1200px,96vw);height:94vh;display:flex;flex-direction:column;background:white;border-radius:16px;box-sizing:border-box}.receipt-layout-editor .invoice-marker-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.receipt-layout-editor button{cursor:pointer}.receipt-layout-editor select{min-width:0;max-width:100%}
.receipt-layout-editor .invoice-marker-panel{max-width:1200px;overflow:auto;padding:20px;gap:12px}
.receipt-layout-tools{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.receipt-layout-workspace{display:grid;grid-template-columns:minmax(260px,1fr) 250px;gap:20px;overflow:auto}
.receipt-layout-sheets{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start}
.receipt-layout-sheet{width:320px;max-width:100%}
.receipt-layout-a4{aspect-ratio:595.28/841.89;background:#fff;border:1px solid #94a3b8;display:grid;padding:10px;box-shadow:0 2px 8px #0002}
.receipt-layout-slot{background:white;border:1px dashed #cbd5e1;min-height:0;min-width:0;padding:3px;display:flex;flex-direction:column;align-items:center;cursor:pointer;overflow:hidden}
.receipt-layout-slot.is-selected{border:2px solid #2563eb}
.receipt-layout-slot>span{font-size:9px;height:18px;flex-shrink:0}
.receipt-layout-image{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}
.receipt-layout-image img{object-fit:contain;max-width:none;max-height:none;flex-shrink:0}
.receipt-layout-controls{display:flex;flex-direction:column;gap:14px;align-self:start;position:sticky;top:0}
.receipt-layout-controls label{display:flex;flex-direction:column;gap:4px}
.receipt-layout-controls p{font-size:12px;color:#475569}
.receipt-layout-editor [data-error]{color:#b91c1c}
@media(max-width:700px){.receipt-layout-workspace{grid-template-columns:1fr}.receipt-layout-controls{position:static}.receipt-layout-sheet{width:100%}}
.receipt-layout-a4{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
.receipt-layout-slot.is-drop-target{outline:3px solid #2563eb;outline-offset:-3px;background:#eff6ff}
.receipt-layout-slot[draggable=true]{cursor:grab}
.receipt-layout-gallery{flex-shrink:0}
.receipt-layout-gallery [data-gallery]{display:flex;gap:10px;overflow:auto;max-height:145px;padding:8px 2px}
.receipt-layout-gallery button{flex:0 0 115px;display:flex;flex-direction:column;align-items:center;background:white;border:1px solid #cbd5e1;border-radius:6px;padding:5px;cursor:grab;font-size:10px}
.receipt-layout-gallery button.is-selected{border:2px solid #2563eb}
.receipt-layout-gallery img{height:75px;width:100%;object-fit:contain}
.receipt-layout-sheet select{max-width:100%}
.receipt-layout-editor .receipt-layout-workspace{min-height:260px;flex:1}
.receipt-layout-slot:focus-visible,.receipt-layout-gallery button:focus-visible{outline:3px solid #2563eb;outline-offset:-3px}
