/* Compact commercial entry forms; estimate and PDF layouts are independent. */
.modal.ws-modal{width:min(1480px,calc(100vw - 24px));padding:14px}
.ws-form{min-width:0}
.ws-form h3{margin:12px 0 5px;font-size:14px}
.ws-form>p,.ws-form fieldset>p{margin:5px 0 7px;line-height:1.45}
.ws-form .grid{gap:8px 12px}
.ws-form fieldset{margin:8px 0;padding:10px;border-radius:5px;min-width:0}
.ws-form .form-section{padding:10px 12px;border-radius:5px}
.ws-form>button,.ws-form fieldset>button{margin:4px 0;min-height:30px;padding:5px 9px}
.ws-form .ws-scroll{border-radius:3px;max-width:100%;max-height:62vh;margin-bottom:0;overflow:auto;scrollbar-width:auto;overscroll-behavior:contain}
.ws-form .ws-scroll:focus-visible{outline:2px solid #2785c8;outline-offset:-2px}
.ws-form .ws-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:0;font-variant-numeric:tabular-nums}
.ws-form .ws-table th{width:auto;position:sticky;top:0;z-index:1;padding:5px 6px;font-size:calc(11px * var(--ui-text-scale,1));line-height:1.3;background:#eaf2fa;color:#224b6b;border-right:1px solid #d4e0eb;border-bottom:1px solid #b8ccdf;letter-spacing:0;text-transform:none}
.ws-form .ws-table td{padding:2px 3px;border-right:1px solid #e0e8f0;border-bottom:1px solid #e0e8f0;font-size:calc(13px * var(--ui-text-scale,1));line-height:1.4;vertical-align:top;white-space:normal;overflow-wrap:anywhere}
.ws-form .ws-table tr:nth-child(even){background:#f7fafd}
.ws-form .ws-table tr:focus-within{background:#edf6ff;box-shadow:inset 3px 0 #0070c0}
.ws-form .ws-table :is(input:not([type=hidden]),textarea,select){box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:28px;height:28px;margin:0;padding:4px 5px;border:1px solid transparent;background:transparent;border-radius:2px;font:inherit;line-height:18px;box-shadow:none}
#milestoneForm.ws-form .ws-table textarea,#pchEditor.ws-form .ws-table textarea,.ws-form .ws-table textarea{min-width:0;min-height:28px;display:block;resize:none;overflow:hidden;white-space:pre-wrap}
.ws-form .ws-table :is(input,textarea,select):hover{border-color:#c5d8e9}
.ws-form .ws-table :is(input,textarea,select):focus{outline:2px solid #2785c8;outline-offset:-1px;border-color:#2785c8;background:white}
.ws-form .ws-table :is(input,textarea,select):disabled{background:#eef2f6;color:#526b80}
.ws-form .ws-table :is(.ws-quantity,.ws-rate,.ws-amount){text-align:right}
.ws-form .ws-table td.ws-amount:not(:has(input)),.ws-form .ws-table td.ws-rate:not(:has(input)){padding:7px 7px 3px}
.ws-form .ws-table .ws-amount{font-weight:650;background:#edf5fb66}
.ws-form .ws-table input[type=number]{text-align:right;appearance:textfield;-moz-appearance:textfield}
.ws-form .ws-table input[type=number]::-webkit-inner-spin-button,.ws-form .ws-table input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.ws-form .ws-table .ws-index{text-align:center;color:#566d80;font-size:11px;padding-top:8px}
.ws-form .ws-table .ws-action{text-align:center}
.ws-form .ws-table button.ws-remove{width:28px;height:28px;min-height:28px;padding:0;margin:0;border:0;border-radius:3px;background:transparent;color:#945762;font-size:20px;line-height:1}
.ws-form .ws-table button.ws-remove:hover{background:#ffe8e8;color:#a52222}
.ws-form .ws-table :is(.pch-edit-description,.ws-description-more){position:relative;padding-right:34px}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more){margin:0;padding:0;border:0;font-size:12px}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more)>summary{position:absolute;right:3px;top:2px;display:block;width:28px;height:28px;text-align:center;font-size:19px;line-height:26px;border-radius:3px;cursor:pointer;color:#526b80;list-style:none}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more)>summary::-webkit-details-marker{display:none}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more)>summary:hover{background:#dcecf9}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more)[open]{margin:4px 0;padding:6px;background:#f0f6fb;border:1px solid #d4e0eb;border-radius:3px}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more)[open]>summary{background:#dcecf9}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more) label{display:block;margin:5px 0;font-size:11px}
.ws-form .ws-table :is(.pch-item-more,.ws-row-more) p{margin:5px 0;font-size:11px}
.ws-form .ws-summary{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px 12px;margin:0 0 4px;padding:6px 8px;border:1px solid #c8dbe9;border-top:0;background:#edf5fb;font-size:calc(12px * var(--ui-text-scale,1));font-variant-numeric:tabular-nums}
.ws-row-count{color:#526b80;line-height:23px}
.ws-summary-values{margin-left:auto;width:min(420px,100%)}
.ws-summary-values>div{display:flex;justify-content:space-between;gap:12px;padding:3px 0}
.ws-summary-values :is(b,strong){text-align:right;overflow-wrap:anywhere}
.ws-summary-values>.ws-summary-total{border-top:1px solid #bdd3e5;font-size:13px;color:#174f78}
.ws-summary-values>.ws-summary-total:first-child{border-top:0}
.ws-summary-note{flex-basis:100%;text-align:right;color:#526b80}
.ws-form .ws-financial-fields{grid-template-columns:1fr 1fr;width:min(420px,100%);margin:6px 0 10px auto}
.ws-form .ws-financial-fields input{min-height:32px;padding:5px 7px;text-align:right}
@media(max-width:640px){.modal.ws-modal{padding:8px;width:calc(100vw - 12px)}.ws-form fieldset{padding:7px}.ws-form .grid{gap:7px}.ws-form .ws-summary{padding:5px}.ws-summary-values{width:100%}.ws-summary-note{text-align:left}}

.ws-form [data-advance-calculation]{text-align:right;padding:6px 8px;background:#edf5fb;border:1px solid #c8dbe9;font-weight:600}
.pch-review .pch-review-items :is(th,td){padding:6px 7px;line-height:1.45}
.pch-review .pch-review-items th{font-size:12px}
.pch-review .pch-review-items td{font-size:13px}

#milestoneForm.ws-form .ws-table td{min-width:0}
#milestoneForm.ws-form .ws-scroll{margin-bottom:0}

.ws-form .dn-note-row{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:4px;align-items:start;margin:4px 0}
.ws-form .dn-note-row button{width:28px;height:28px;min-height:28px;margin:24px 0 0;padding:0;border:0;background:transparent;color:#945762;font-size:20px}
.ws-form .dn-note-row textarea{min-height:54px}

/* Delivery Note PDF actions share the editor's action row and button sizing. */
.dn-document-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;padding:10px 15px;border:1px solid var(--line,#c8d7e6);border-radius:7px;background:#fff;color:var(--navy,#163d5c);font:inherit;font-weight:600;line-height:1.35;text-align:center;text-decoration:none;white-space:normal;cursor:pointer}
.dn-document-button:hover{background:#eff6ff;border-color:#94bdf8;text-decoration:none}
.dn-document-button:focus-visible{outline:3px solid #5eaeff;outline-offset:3px}
#dnForm .dn-editor-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px}
#dnForm .dn-editor-actions>button{min-height:44px;line-height:1.35;margin:0;padding:10px 15px}
#dnForm [data-dn-preview]{display:flex;align-items:stretch;max-width:100%}
#dnForm [data-dn-preview][hidden]{display:none!important}
#dnForm .dn-preview-status{margin:8px 0 0;line-height:1.4}
#dnForm .dn-preview-status:empty{display:none}
@media(max-width:600px){#dnForm .dn-editor-actions>button,#dnForm [data-dn-preview],#dnForm .dn-document-button{width:100%}}
