/* The existing customs form wraps each control inside its label. The shared
   four-column label/control grid assumes sibling nodes and overlaps this form.
   Fix only this form's layout; retain all controls, values and handlers. */
#customsScreen #customsForm .formGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;align-items:start;margin-bottom:14px}
#customsScreen #customsForm .formGrid>label{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:0;text-align:left;overflow-wrap:anywhere}
#customsScreen #customsForm .formGrid input,#customsScreen #customsForm .formGrid select,#customsScreen #customsForm .formGrid textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin:0}
#customsScreen #customsForm .formGrid textarea{min-height:64px;resize:vertical}
#customsScreen #customsForm #customsPrintLabel{display:inline-flex;align-items:center;gap:6px;margin:0 6px 6px 0;vertical-align:middle}
#customsScreen #customsForm #customsPrintChoice{min-height:30px;border:1px solid #b6b6b6;border-radius:5px;font:inherit;background:#fff;max-width:100%}
#customsScreen #customsForm #customsFooterSearch,#customsScreen #customsForm #customsSaveAndNew,#customsScreen #customsForm #customsSave{margin:0 6px 6px 0;vertical-align:middle}
#customsVATBreakdown{min-width:0;margin:0 0 14px;padding:10px;border:1px solid #b6b6b6}
#customsCreateWorksheet{min-width:0;margin:0 0 14px;padding:10px;border:1px solid #b6b6b6}
#customsCreateWorksheet .customsCreateComponents{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
#customsCreateWorksheet .customsCreateComponents label{display:inline-flex;align-items:center;gap:5px}
#customsCreateWorksheet .customsCreateComponents input{width:auto;margin:0}
#customsVATBreakdown table{width:100%;table-layout:fixed}
#customsVATBreakdown th:first-child{width:15%}
#customsVATBreakdown input{box-sizing:border-box;width:100%;min-width:0;min-height:30px;border:1px solid #b6b6b6;border-radius:5px;font:inherit;padding:5px;background:#fff}
@media(max-width:700px){#customsScreen #customsForm .formGrid{grid-template-columns:minmax(0,1fr)}}

#customsAllocateForm{min-width:0;width:100%}.customsLineScroll{overflow-x:auto;max-width:100%}.customsLineScroll table{min-width:1100px}.customsLineScroll input{min-width:90px;width:100%;box-sizing:border-box}.customsLineScroll[hidden]{display:none}

.customsReceiptSource{padding:8px 0;border-bottom:1px solid #ccc;margin-bottom:12px}.customsReceiptSource dl{display:grid;grid-template-columns:100px minmax(0,1fr);gap:5px;margin:8px 0}.customsReceiptSource dd{margin:0}.customsReceiptSource p{font-size:12px}.customsLineScroll [data-import-vat-rate]{min-width:90px;width:100%}
@media print{
 #customsAllocationPaper .customsLineScroll{overflow:visible;max-width:100%}
 #customsAllocationPaper [data-customs-saved-lines]{min-width:0;width:100%;table-layout:fixed}
 #customsAllocationPaper [data-customs-saved-lines] th,#customsAllocationPaper [data-customs-saved-lines] td{white-space:normal;overflow-wrap:anywhere;padding:3px;font-size:8px}
 #customsAllocationPaper [data-customs-saved-lines] thead{display:table-header-group}
 #customsAllocationPaper [data-customs-saved-lines] tr{break-inside:avoid}
}

#customsCreateWorksheet .customsCostTotal{text-align:right;font-weight:600;margin:12px 0 0}
