.purchase-toolbar{display:grid;grid-template-columns:minmax(160px,1fr) minmax(220px,2fr) minmax(200px,1.4fr);gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.purchase-toolbar label,.purchase-fields label{display:grid;gap:5px;font-size:12px;color:var(--muted);min-width:0}.purchase-toolbar input,.purchase-toolbar select,.purchase-fields input{min-width:0;width:100%;height:36px;font-size:13px;padding:6px 9px}.purchase-plan{display:grid;grid-template-columns:minmax(260px,1fr) minmax(280px,1.5fr);gap:24px;padding:16px 0}.purchase-plan>div{min-width:0}.purchase-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.purchase-section-heading h3{margin:0;font-size:15px}#purchaseForm fieldset{border:0;padding:0;margin:0;min-width:0}.purchase-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-content:start}.purchase-fields .wide{grid-column:1/-1}.purchase-fields textarea{min-height:74px;padding:8px;resize:vertical}#purchaseAllocations table{width:100%;min-width:0}#purchaseAllocations td,#purchaseAllocations th{padding:6px 10px;font-size:12px}#purchaseAllocations input{width:100%;min-width:0;height:32px;padding:5px 8px}#purchaseAllocations td:last-child{width:38px}#purchaseAllocations button{width:26px;min-height:26px;padding:0;font-size:20px}#purchaseAllocationTotal{font-size:13px;margin-top:8px}.purchase-actions{justify-content:flex-end;padding:14px 0}#purchaseOverview button{font-size:13px;min-height:32px}#purchaseError{color:#ae3140;font-size:13px}#purchaseError:empty{display:none}#purchaseSheet{background:white;padding:20px 0;border-top:1px solid var(--line)}.purchase-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.purchase-sheet-heading h2{font-size:19px;margin:0}.purchase-sheet-heading strong{font-size:13px}.purchase-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.purchase-info dt{font-size:12px;color:var(--muted)}.purchase-info dd{margin:4px 0 0;font-size:13px;overflow-wrap:anywhere}#purchaseSheet h3{font-size:15px;margin:18px 0 10px}#purchaseSheet .table-wrap{max-width:100%;overflow:auto}#purchaseSheet td,#purchaseSheet th{font-size:12px;padding:9px 10px;white-space:normal;overflow-wrap:anywhere}.purchase-amount{text-align:right;font-weight:600;font-size:14px;margin-top:12px}.purchase-note{white-space:pre-wrap;overflow-wrap:anywhere}
.purchase-grid-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:12px 0}.purchase-grid-toolbar label{display:grid;gap:4px;font-size:12px;color:var(--muted);min-width:105px;flex:1}.purchase-grid-toolbar label:first-of-type{flex:2;min-width:190px}.purchase-grid-toolbar input,.purchase-grid-toolbar select{width:100%;min-width:0;height:34px;padding:5px 8px;font-size:12px}.purchase-grid-toolbar .actions{gap:6px}.purchase-grid-toolbar .actions button{white-space:nowrap;padding:5px 10px}.purchase-groups{display:flex;align-self:end;border-bottom:1px solid var(--line);gap:10px}.purchase-groups button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:6px;color:var(--muted)}.purchase-groups button[aria-selected=true]{color:#176758;border-bottom-color:#176758;font-weight:600}
.purchase-grid-wrap{overflow:auto;max-width:100%;max-height:calc(100dvh - 245px);min-height:180px;border:1px solid #cdd4df;background:white}.purchase-grid-wrap table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:100%;min-width:1560px}.purchase-grid-wrap th,.purchase-grid-wrap td{font-size:12px;line-height:1.45;padding:6px 7px;border-right:1px solid #dde1e8;border-bottom:1px solid #dde1e8;vertical-align:middle;text-align:center;overflow-wrap:anywhere}.purchase-grid-wrap thead{position:sticky;top:0;z-index:3}.purchase-grid-wrap thead th{background:#e3eafb;color:#202733;font-weight:600}.purchase-grid-wrap thead tr:first-child{height:30px}.purchase-grid-wrap thead tr:nth-child(2){height:28px}.purchase-grid-wrap th button{border:0;background:none;padding:0;font-size:12px;min-height:22px!important;color:inherit}.purchase-grid-wrap .purchase-fixed{position:sticky;left:0;width:105px;z-index:1;background:white;box-shadow:1px 0 #cdd4df}.purchase-grid-wrap thead .purchase-fixed{z-index:4;background:#e3eafb}.purchase-grid-wrap th:nth-child(2)[rowspan]{width:112px}.purchase-grid-wrap th:nth-child(3)[rowspan]{width:90px}.purchase-grid-wrap th:nth-child(4)[rowspan]{width:80px}.purchase-grid-wrap th:nth-child(5)[rowspan],.purchase-grid-wrap th:nth-child(6)[rowspan]{width:75px}.purchase-grid-wrap th[colspan]{width:365px}.purchase-grid-wrap thead tr:nth-child(2)>th:first-child{width:175px}.purchase-grid-wrap .purchase-size-col{width:52px}.purchase-grid-wrap th:last-child[rowspan]{width:125px}.purchase-grid-wrap tbody td{height:52px}.purchase-grid-wrap .purchase-totals th,.purchase-grid-wrap .purchase-totals td{background:#faf0d2!important;font-weight:600;height:30px}.purchase-grid-wrap .purchase-totals td:first-of-type{text-align:left;color:#61666e}.purchase-grid-wrap tbody tr:hover td{box-shadow:inset 0 0 0 999px #18354c06}.purchase-grid-wrap .purchase-quantity{background:#def3fa;font-weight:600}.purchase-grid-wrap .purchase-date-0{background:#bde1b1}.purchase-grid-wrap .purchase-date-1{background:#eef2ac}.purchase-grid-wrap .purchase-date-2{background:#dce8fa}.purchase-grid-wrap .purchase-suppliers{text-align:left}.purchase-suppliers>div+div{border-top:1px dashed #e3e7ed;margin-top:4px;padding-top:4px}.purchase-grid-wrap small{display:block;font-size:11px;color:#697381}.purchase-brand,.purchase-kind,.purchase-place{display:inline-block;padding:2px 6px;border-radius:4px;max-width:100%;overflow-wrap:anywhere}.purchase-brand{background:#f3a2cc;color:#472239}.purchase-brand.brand-y{background:#d4e5b9;color:#314421}.purchase-kind{background:#f8dce9}.purchase-kind.repeat{background:#fac9c5;color:#9d352c}.purchase-place{background:#d3e2fb;color:#314c73}.purchase-grid-wrap .purchase-row-link{background:none;border:0;padding:0;color:inherit;font-weight:600;white-space:normal;min-height:20px!important}.purchase-grid-wrap .purchase-row-link:hover{text-decoration:underline}.purchase-grid-wrap .purchase-row-note{text-align:left;white-space:pre-wrap}.purchase-grid-wrap .purchase-no-results{height:150px;color:var(--muted)}#purchaseTableFoot{margin-top:10px;font-size:12px}
#purchaseEditorDialog{width:min(1200px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden}#purchaseEditorDialog[open]{display:flex;flex-direction:column}.purchase-dialog-heading{display:flex;align-items:center;justify-content:space-between;background:#f0f6f2;padding:12px 18px;border-bottom:1px solid var(--line);flex:none}.purchase-dialog-heading h2{font-size:19px;margin:0!important}.purchase-dialog-heading .dialog-close{float:none}#purchaseEditorContent{padding:0 18px 18px;overflow:auto;min-height:0}#purchaseEditorContent button{font-size:13px}#purchaseEditorContent .purchase-fields select{height:36px;font-size:13px;min-width:0}#purchasePrintSheet{display:none}
@media(max-width:650px){.purchase-grid-toolbar label{flex:1 1 calc(50% - 10px);min-width:0}.purchase-grid-toolbar label:first-of-type{min-width:0;flex:1 1 calc(100% - 100px)}.purchase-grid-toolbar .actions{width:100%;justify-content:flex-end}.purchase-grid-wrap{max-height:calc(100dvh - 360px)}#purchaseEditorContent{padding:0 12px 12px}#purchaseEditorDialog{max-height:calc(100dvh - 16px)}.purchase-grid-wrap .purchase-fixed{width:95px}}
@media print{body.printing-purchase> :not(#purchasePrintSheet){display:none!important}body.printing-purchase #purchasePrintSheet{display:block!important}#purchasePrintSheet table{width:100%;min-width:0!important;table-layout:fixed}#purchasePrintSheet td,#purchasePrintSheet th{min-width:0!important;font-size:9px;padding:5px;overflow-wrap:anywhere}#purchasePrintSheet h3{margin:15px 0 8px;font-size:14px}#purchasePrintSheet thead{display:table-header-group}#purchasePrintSheet tr{break-inside:avoid}#purchasePrintSheet .table-wrap{overflow:visible}#purchasePrintSheet .purchase-info{grid-template-columns:repeat(3,1fr)}}
#purchaseSheet h3:nth-of-type(-n+2)+.table-wrap table{min-width:1050px}#purchaseSheet h3:nth-of-type(3)+.table-wrap table{min-width:420px}
@media(max-width:650px){.purchase-toolbar{grid-template-columns:1fr}.purchase-plan{grid-template-columns:1fr;gap:14px}.purchase-info{grid-template-columns:1fr 1fr}.purchase-actions{justify-content:flex-start;flex-wrap:wrap}}
@media print{body.printing-purchase #view-query{display:none!important}body.printing-purchase #view-purchase{display:block!important}body.printing-purchase .purchase-toolbar,body.printing-purchase #purchaseForm,body.printing-purchase .purchase-actions,body.printing-purchase #purchaseError{display:none!important}body.printing-purchase #purchaseSheet{padding:0;border:0}body.printing-purchase #purchaseSheet table{width:100%;min-width:0!important;table-layout:fixed}body.printing-purchase #purchaseSheet th,body.printing-purchase #purchaseSheet td{font-size:9px;padding:5px;min-width:0!important}body.printing-purchase #purchaseSheet thead{display:table-header-group}body.printing-purchase #purchaseSheet tr{break-inside:avoid}body.printing-purchase .purchase-info{grid-template-columns:repeat(3,1fr)}}
