dialog:has(#structure-record.supplier-order){width:min(1150px,98vw);height:min(856px,96dvh);max-height:96dvh}
dialog:has(.supplier-order)>h1{border-bottom:1px solid #d8d8d8;padding-left:10px}
dialog form.supplier-order{gap:0}
.order-fields{display:grid;grid-template-columns:114px 145px 145px minmax(160px,1fr) 150px 110px;gap:10px 15px;padding:11px 10px 7px}
.order-number{grid-column:1}.order-date{grid-column:2}.order-supplier{grid-column:3/5}.order-posted{grid-column:5}.order-accepted{grid-column:6}
.order-note{grid-column:1/3}.order-planned{grid-column:3}.order-warehouse{grid-column:4}.order-files{grid-column:5/7}
.order-field{font:600 12px/17px Inter,Arial,sans-serif;color:#4f4f4f;gap:2px}
.order-input{min-width:0;display:flex;align-items:center;border:1px solid #ccc;height:28px}
.order-number .order-input,.order-date .order-input,.order-supplier .order-input,.order-warehouse .order-input{border-color:#ff9800}
.order-input input,.order-barcode input{border:0;width:100%;height:26px;padding:0 6px;min-height:0;line-height:25px;color:#000}
.order-input input:focus-visible,.order-barcode input:focus-visible{outline-offset:-1px}
.order-field-icon{flex:none}
dialog .order-field-icon{height:26px;min-height:0;padding:0 5px;border:0;background:#fff;color:#93999d}
.order-field-icon[data-action=order-supplier-new]{background:#33b34a;color:white}
.order-icon{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.7;vertical-align:middle;color:#0d7bd9}
.order-icon-clear{color:#93999d}
.order-icon-receive,.order-icon-book,.order-icon-money{color:#22b148}
.order-icon-attach{color:white}
.order-switch{height:47px;display:flex;align-items:end;justify-content:space-between;padding:0 0 7px;gap:8px;color:#4f4f4f;font-size:12px}
.order-switch input{appearance:none;width:32px;height:14px;min-height:0;border:0;border-radius:10px;background:#ddd;position:relative;padding:0;cursor:pointer}
.order-switch input::before{content:"";position:absolute;left:0;top:-2px;width:18px;height:18px;background:#b8b8b8;border-radius:50%}
.order-switch input:checked{background:#7de589}
.order-switch input:checked::before{left:14px;background:#35b44b}
.order-attachments{background:#f6f8fa;border-style:dashed;justify-content:space-between;padding-left:6px;font-weight:400}
#order-attachment-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.order-upload{position:relative;display:grid;place-items:center;width:28px;height:28px;background:#0d7bd9;flex:none}
.order-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}
.order-tools{margin:10px 10px 10px;gap:10px;flex:none}
.order-tools .action-button{height:28px;min-height:28px}
.order-menu-anchor{position:relative}
.order-line-menu{position:absolute;top:100%;left:0;z-index:2;min-width:205px;background:#fff;border:1px solid #ddd;box-shadow:0 2px 5px #0004;padding:0}
dialog .order-line-menu button{width:100%;justify-content:start;background:#fff;border:0;padding:5px 8px;font-weight:400}
dialog .order-line-menu button:hover{background:#eaf5fc}
.order-barcode{display:flex;align-items:center;border:1px solid #ccc;width:200px;padding-right:7px}
.supplier-order>.doc-picker{margin:0 10px 8px}
.order-grid{min-height:110px}
.order-grid table{table-layout:fixed}
.order-grid th{height:32px;padding:0 8px;border:1px solid #ccc;color:black;font-weight:600}
.order-grid th:nth-child(n+2):nth-child(-n+5){text-align:right}
.order-grid th:first-child{width:44%}
.order-empty{text-align:center;color:#aaa;font:400 24px/30px Inter,Arial,sans-serif;margin:44px 0}
.supplier-order output{margin:0;min-height:0}
.supplier-order output:not(:empty){padding:3px 10px}
.order-footer{min-height:78px;border-top:1px solid #ddd;padding:9px 10px;align-items:flex-start;gap:25px}
.order-footer-actions{display:flex;gap:10px;align-self:flex-end;margin-right:auto}
dialog .order-footer .doc-save{min-width:120px}
dialog .order-footer .doc-cancel{min-width:100px}
.order-weight{display:flex;gap:6px;align-items:center;font:600 12px/20px Inter,Arial,sans-serif;color:#4f4f4f;white-space:nowrap}
.order-weight b{margin-left:28px;color:#000}
.order-totals{width:min(340px,36vw);font-size:12px;color:#4f4f4f}
.order-totals>div{display:flex;justify-content:space-between;border-bottom:1px solid #bbb;line-height:19px;gap:8px}
.order-totals>div:first-child{color:#242b31;border-color:#222;font-size:14px}
.order-totals>div:nth-child(2)>b,.order-totals button{color:#1dac38}
dialog .order-totals button{background:transparent;border:0;min-height:0;padding:0;font-size:12px;font-weight:400;color:#1dac38;text-decoration:underline dotted}
@media(max-width:900px){.order-fields{grid-template-columns:repeat(3,minmax(0,1fr))}.order-fields>div{grid-column:auto}.order-switch{height:32px}.order-tools{margin-block:5px}.order-footer{gap:10px}}
@media(max-width:560px){.order-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px}.order-footer{flex-wrap:wrap}.order-totals{width:auto;flex:1}.order-empty{font-size:17px}}
