.cost-summary{display:grid;grid-template-columns:1fr 1fr;gap:16px}.cost-summary strong{display:block;font-size:26px;margin:12px 0}.cost-summary small{display:block}.cost-filters{display:flex;align-items:end;gap:12px;margin:20px 0}.cost-filters label:nth-child(2){flex:1}.cost-record{margin-bottom:12px;padding:18px;background:white;border:1px solid #dce3ef;border-radius:12px}.cost-record summary{cursor:pointer;display:flex;gap:16px;justify-content:space-between}.cost-record h3{margin:0 0 6px;font-size:16px}.cost-record small{display:block;color:#64748b}.cost-record .money{white-space:nowrap;font-weight:600}.cost-record .detail{padding-top:16px;line-height:1.8}.settlement-box{background:#f3f6fa;padding:12px;margin:10px 0;border-radius:8px}.cost-record a{margin-right:12px}#module-nav{max-width:1140px;margin:16px auto;display:flex;gap:20px;padding:0 20px}#module-nav[hidden]{display:none}@media(max-width:600px){.cost-summary{grid-template-columns:1fr}.cost-filters{flex-wrap:wrap}.cost-filters label{width:100%}.cost-record summary{flex-direction:column;gap:8px}.cost-summary strong{font-size:23px}}
.cost-location,.unit-actions{display:flex;align-items:center;gap:12px;margin:16px 0}.cost-filters{flex-wrap:wrap}.cost-filters label:nth-child(2){flex:initial}.cost-filters .cost-search{flex:1;min-width:160px}.cost-record{overflow-wrap:anywhere}.cost-record summary>div{min-width:0}.unit-card>p{margin-bottom:8px}.cost-location strong{overflow-wrap:anywhere}@media(max-width:600px){.cost-filters .cost-search{flex-basis:100%}.cost-location{align-items:flex-start}.cost-location button{flex-shrink:0}.cost-record .money{white-space:normal}}
.cost-editor{width:min(640px,90vw);max-height:85vh;border:1px solid #d5deeb;border-radius:16px;padding:24px;overflow:auto}.cost-editor::backdrop{background:#14243d66}.cost-editor form{display:grid;gap:14px;margin:16px 0}.cost-editor label{display:grid;gap:6px}.cost-editor input,.cost-editor select,.cost-editor textarea{width:100%;box-sizing:border-box}.cost-editor textarea{min-height:90px}.cost-editor p{overflow-wrap:anywhere}
.cost-editor input[type=checkbox]{width:auto;justify-self:start}.cost-editor fieldset{border:1px solid #d5deeb;border-radius:10px;display:grid;gap:12px;padding:16px}.cost-editor legend{max-width:100%;overflow-wrap:anywhere}.cost-editor details>button{margin:12px 8px 12px 0}
.cost-record .contract-detail-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px 24px;margin:0 0 16px;max-width:1120px}
.contract-detail-info>div{min-width:0}.contract-detail-info dt{font-size:13px;color:var(--ui-muted,#697685)}.contract-detail-info dd{margin:2px 0 0;color:var(--ui-text,#293440);overflow-wrap:anywhere;white-space:normal}
.cost-record .contract-detail-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}.contract-detail-actions button{max-width:100%;white-space:normal}
.cost-record .contract-detail>.contract-attachments{margin:0;padding-top:8px}.contract-detail>.contract-attachments>summary{margin-bottom:8px}.contract-detail>.contract-attachments>div>p{margin:12px 0}
@media(min-width:1200px){.cost-record .contract-detail-info{grid-template-columns:repeat(3,minmax(0,1fr))}}
.cost-order-editor{width:min(760px,calc(100vw - 24px));color:var(--ui-text)}
.order-selectors{display:grid;grid-template-columns:1fr 2fr;gap:16px}.order-selectors label{display:grid;gap:8px;min-width:0}.order-selectors select{width:100%;min-width:0}
.order-note{font-size:13px;color:var(--ui-muted);line-height:1.6}.order-list{list-style:none;margin:16px 0;padding:0;display:grid;gap:8px}
.cost-order-editor h3{position:sticky;top:0;z-index:2;background:var(--ui-surface);padding:8px 0;overflow-wrap:anywhere}
.order-row{position:relative;display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 12px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:var(--ui-radius);box-sizing:border-box}
.order-name{flex:1;min-width:0;overflow-wrap:anywhere}.order-moves{display:flex;gap:6px;flex-shrink:0}.order-moves button,.order-handle{min-height:44px}
.order-handle{cursor:grab;touch-action:none;user-select:none;flex-shrink:0;min-width:44px;font-size:22px}.order-dragging{background:var(--ui-amber-soft);border-color:var(--ui-amber)}.order-dragging .order-handle{cursor:grabbing}
.order-pinned{background:var(--ui-bg);color:var(--ui-muted)}.order-pinned small{flex-shrink:0}
.order-drop-before:before,.order-drop-after:after{content:'';position:absolute;left:0;right:0;height:3px;background:var(--ui-amber);z-index:1}.order-drop-before:before{top:-6px}.order-drop-after:after{bottom:-6px}
@media(max-width:600px){.order-selectors{grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:10px}.order-row{gap:8px;padding:8px}.order-moves{flex-direction:column;gap:4px}.order-moves button{padding:6px 10px}.cost-order-editor .ui-modal-footer{flex-wrap:wrap}.cost-order-editor .ui-modal-footer button{padding:8px 12px}.cost-order-editor h3{font-size:16px}.cost-order-editor .order-note{margin:12px 0}}
.business-record-summary{display:grid!important;grid-template-columns:.7fr 1fr 1.3fr 1fr 1.3fr 1fr .8fr .8fr;gap:12px;align-items:start!important}.business-record-cell{display:flex;flex-direction:column;gap:6px;min-width:0;overflow-wrap:anywhere}.business-record-cell small{color:var(--ui-muted,#697685);font-size:12px}.business-record-summary .record-toggle-hint{grid-column:1/-1;text-align:right}.business-record-card .detail{margin-top:12px}#record-filters[hidden],#record-filters label[hidden]{display:none!important}@media(max-width:1100px){.business-record-summary{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:600px){.business-record-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.business-record-cell:nth-child(5){grid-column:1/-1}}
.supplier-association{padding:12px 16px;margin:12px 0;background:var(--ui-bg,#f2f4f6);border:1px solid var(--ui-border,#e0e4e8);border-radius:10px;overflow-wrap:anywhere;}
.supplier-association p{margin:8px 0;}
.payment-amount-view{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:0;overflow-wrap:anywhere}
.payment-amount-view small{color:var(--ui-muted,#697685);font-size:13px;white-space:normal}
.refund-state{display:inline-block;padding:3px 8px;border-radius:5px;background:var(--ui-amber-soft,#fbf1dc);color:#79521d;font-size:13px;white-space:normal}
.refund-state[data-state="full"]{background:#edf1f3;color:var(--ui-graphite,#26323d)}
.refund-info{margin:12px 0;padding:12px;border:1px solid var(--ui-border,#e0e4e8);border-radius:8px;overflow-wrap:anywhere}
.refund-info h4{margin:0 0 8px}.refund-review{color:#9a5d16}
@media(max-width:600px){.payment-amount-view{align-items:flex-start;width:100%}.payment-amount-view .money{white-space:normal}}
/* Compact review worklist; amounts are original values, not a mixed paid total. */
.review-compact{margin:6px 0!important;padding:0!important}.review-line{display:grid!important;grid-template-columns:24px minmax(160px,1.5fr) minmax(85px,.7fr) minmax(120px,1fr) minmax(160px,1.5fr) minmax(130px,auto);gap:12px;align-items:center;padding:12px!important;font-size:14px}.review-line>*{min-width:0;overflow-wrap:anywhere}.review-line input[type=checkbox]{width:18px;height:18px}.review-main{display:grid;gap:4px}.review-main small{color:var(--muted,#64748b)}.review-actions{display:flex;flex-wrap:wrap;gap:6px}.review-compact .detail{padding:12px 20px!important}.review-line::marker{content:''}@media(max-width:1200px){.review-line{grid-template-columns:24px minmax(0,1fr)!important;gap:8px!important}.review-line>span,.review-line>.review-actions{grid-column:2}.review-main strong{font-size:14px}.review-line button{min-height:40px;white-space:normal}}
