/* Sales-return composition is owned here, without changing purchase forms. */
.accounting-sales-return-table th:nth-child(1){width:8%}
.accounting-sales-return-table th:nth-child(2){width:9%}
.accounting-sales-return-table th:nth-child(3){width:8%}
.accounting-sales-return-table th:nth-child(4){width:23%}
.accounting-sales-return-table th:nth-child(5){width:11%}
.accounting-sales-return-table th:nth-child(6){width:15%}
.accounting-sales-return-table th:nth-child(7){width:12%}
.accounting-sales-return-table th:nth-child(8){width:8%}
.accounting-sales-return-table th:nth-child(9){width:6%}
#accounting-customers-view .sales-return-command-bar{display:flex;align-items:center;gap:5px;height:auto;min-height:34px;margin-bottom:4px;padding:2px 5px;border:1px solid var(--ui-line);border-radius:6px;background:#fff}
#accounting-customers-view .sales-return-status{display:flex;align-items:center;gap:4px;min-width:0}
#accounting-customers-view .sales-return-status>span{display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 8px;border:1px solid var(--ui-line);border-radius:5px;background:#f7fafc;color:#587087;font-size:calc(8.5px + var(--ui-font-step));font-weight:850;white-space:nowrap}
#accounting-customers-view .sales-return-status>span i{width:6px;height:6px;border-radius:50%;background:#f0a521}
#accounting-customers-view .sales-return-status>span:nth-child(2) i{background:#24a36b}
#accounting-customers-view .sales-return-status>span b{display:grid;place-items:center;min-width:18px;height:17px;padding-inline:4px;border-radius:9px;background:#e7eef4;color:var(--ui-navy);font-size:calc(7.5px + var(--ui-font-step))}
#accounting-customers-view .sales-return-status>small{overflow:hidden;color:var(--ui-muted);font-size:calc(8px + var(--ui-font-step));font-weight:750;text-overflow:ellipsis;white-space:normal}
#accounting-customers-view .sales-return-create{height:25px;min-height:25px;margin-right:auto;padding-inline:10px}
#accounting-customers-view .sales-return-command-bar>.screen-export-actions{margin-right:0}
#return-modal .sales-return-modal-card{width:min(1280px,calc(100vw - 20px));height:min(800px,calc(100dvh - 20px));max-height:calc(100dvh - 20px);display:flex;flex-direction:column;overflow:hidden}
#return-modal .sales-return-modal-header{flex:0 0 auto;padding:9px 12px;border-bottom:1px solid var(--ui-line)}
#return-modal .sales-return-modal-header h2{font-size:16px;margin:2px 0}
#return-modal .sales-return-modal-header p{margin:0;color:var(--ui-muted);font-size:11px}
#return-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden}
#return-modal .sales-return-modal-content{flex:1 1 auto;min-height:0;overflow:auto;padding:10px 12px;display:flex;flex-direction:column;gap:10px}
#return-modal .sales-return-source-panel,#return-modal .sales-return-lines-panel,#return-modal .sales-return-details-panel{border:1px solid var(--ui-line);border-radius:7px;background:#fff;padding:9px;min-width:0}
#return-modal .sales-return-source-panel>header,#return-modal .sales-return-lines-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
#return-modal .sales-return-source-panel>header small,#return-modal .sales-return-lines-head small{display:block;color:var(--ui-muted);font-size:11px;line-height:1.6}
#return-modal .sales-return-source-grid{display:grid;grid-template-columns:minmax(150px,1fr) minmax(250px,2fr) minmax(150px,1fr);gap:8px;align-items:end;margin-top:6px}
#return-modal .sales-return-source-grid.manual-source{grid-template-columns:1fr 1fr}
#return-modal #return-manual-fields{grid-template-columns:minmax(250px,2fr) minmax(130px,1fr) minmax(130px,1fr)}
#return-modal .field{margin:0;min-width:0}#return-modal .field input,#return-modal .field select{min-height:30px;width:100%}
#return-modal .sales-return-lines-head>div:last-child{display:flex;gap:5px;flex:0 0 auto}
#return-modal .sales-return-lines-wrap{max-height:none;overflow:auto;min-width:0;border:1px solid var(--ui-line);border-radius:5px}
#return-modal .sales-return-lines-table{width:100%;min-width:940px;table-layout:fixed}
#return-modal .sales-return-lines-table th,#return-modal .sales-return-lines-table td{padding:6px;text-align:right;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
#return-modal .sales-return-lines-table th{position:sticky;top:0;z-index:1;background:#eef5fa;font-size:11px}
#return-modal .sales-return-lines-table th:nth-child(1){width:48px}#return-modal .sales-return-lines-table th:nth-child(2){width:40px}#return-modal .sales-return-lines-table th:nth-child(3){width:24%}
#return-modal .sales-return-lines-table td small{display:block;margin-top:3px;color:var(--ui-muted)}
#return-modal .sales-return-lines-table input:not([type=checkbox]),#return-modal .sales-return-lines-table select{width:100%;min-width:0;height:30px;padding:3px 5px}
#return-modal .sales-return-lines-table.manual th:nth-child(1){width:38px}#return-modal .sales-return-lines-table.manual th:nth-child(2){width:24%}#return-modal .sales-return-lines-table.manual th:nth-child(3){width:85px}#return-modal .sales-return-lines-table.manual th:nth-child(7){width:180px}#return-modal .sales-return-lines-table.manual th:last-child{width:46px}
#return-modal .return-dimensions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}#return-modal .return-dimensions input{font-size:10px}
#return-modal .sales-return-footer-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#return-form>.modal-actions{flex:0 0 auto;display:flex;justify-content:flex-end;gap:6px;margin:0;padding:8px 12px;border-top:1px solid var(--ui-line);background:#fff}
#return-modal #return-draft-total{white-space:nowrap;font-weight:800}
#return-modal #return-source-summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin-top:8px;padding:7px;background:#f5f9fc;border-radius:5px}
#accounting-customers-view .sales-return-register-card{min-width:0}#accounting-customers-view .sales-return-register-table{min-width:900px}
@media(max-width:600px){#return-modal .sales-return-modal-card{width:calc(100vw - 10px);height:calc(100dvh - 10px);max-height:calc(100dvh - 10px)}#return-modal .sales-return-source-grid,#return-modal .sales-return-source-grid.manual-source,#return-modal #return-manual-fields,#return-modal .sales-return-footer-fields{grid-template-columns:1fr}#return-modal .sales-return-source-panel>header,#return-modal .sales-return-lines-head{align-items:flex-start;flex-direction:column}#return-modal .sales-return-modal-content{padding:7px}#accounting-customers-view .sales-return-command-bar{flex-wrap:wrap}#accounting-customers-view .sales-return-status{flex-wrap:wrap}}
