.agreement-page{padding:0;overflow:hidden}.agreement-filter{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr));gap:12px;padding:18px;border-bottom:1px solid #dbe5ee;background:#f8fbff}.agreement-filter label{font-size:12px;color:#587086;display:flex;flex-direction:column;gap:5px}.agreement-filter input,.agreement-filter select{width:100%;height:34px;min-width:0;padding:5px 9px;border:1px solid #c7d7e6;border-radius:4px;background:white;color:#22394c}.agreement-query-actions{grid-column:span 3;display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}.agreement-query-actions .btn{height:34px}.agreement-table{width:100%;min-width:1140px;table-layout:fixed}.agreement-table th:nth-child(1){width:52px}.agreement-table th:nth-child(2){width:16%}.agreement-table th:nth-child(3){width:132px}.agreement-table th:nth-child(4){width:105px}.agreement-table th:nth-child(5){width:28%}.agreement-table th:nth-child(6){width:13%}.agreement-table th:nth-child(7){width:80px}.agreement-table th:nth-child(8){width:150px}.agreement-table th{background:#edf4fb;color:#405c73;border-right:1px solid #dce6f0;height:43px}.agreement-table td{padding:13px 10px;vertical-align:top;overflow-wrap:anywhere;border-right:1px solid #e8eef4}.agreement-table tr:nth-child(even){background:#f9fbfd}.agreement-table td small{display:block;color:#73889a;font-size:11px;margin-top:4px}.agreement-date{font-size:12px;white-space:nowrap}.agreement-date span{color:#8292a0}.agreement-lines div+div{margin-top:10px}.agreement-lines{font-size:12px}.agreement-lines b{font-weight:500}.agreement-actions{display:flex;flex-wrap:wrap;gap:7px 11px}.agreement-actions .link{font-size:12px;padding:0;white-space:nowrap}.agreement-danger{color:#b93f3f!important}.agreement-sort{border:0;background:none;color:inherit;font:inherit;font-weight:inherit;padding:0;cursor:pointer}.agreement-empty{height:310px;text-align:center!important;vertical-align:middle!important;color:#6a8295}.agreement-pagination{padding:13px 17px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #dce6f0;font-size:12px;color:#637d92}.agreement-pagination select{padding:6px;border:1px solid #c7d7e6;border-radius:4px}.agreement-pagination .btn{padding:5px 10px}.agreement-editor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:18px 22px}.agreement-editor-grid label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#587086}.agreement-editor-grid input,.agreement-editor-grid select,.agreement-editor-grid textarea{width:100%;min-width:0;border:1px solid #c7d7e6;border-radius:5px;padding:8px;color:#22394c;background:#fff}.agreement-editor-grid input[readonly]{background:#f1f5f8;color:#788b9a}.agreement-wide{grid-column:1/-1}.agreement-editor-lines{padding:0 22px}.agreement-section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:14px 0 10px}.agreement-section-head h3{margin:0;font-size:15px}.agreement-editor-lines table{min-width:850px;width:100%}.agreement-editor-lines td{padding:7px 5px}.agreement-editor-lines input{width:100%;min-width:65px;max-width:210px;border:1px solid #c7d7e6;border-radius:4px;padding:7px}.agreement-editor-lines th:first-child{width:23%}.agreement-editor-lines th:nth-child(2){width:10%}.agreement-editor-lines th:nth-child(6){width:23%}#agreementEditor>.hint,#agreementError{margin:12px 22px}.agreement-document{padding:20px 24px;max-height:68vh;overflow:auto}.agreement-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.agreement-summary small{display:block;color:#71879a;font-size:12px;margin-bottom:5px}.agreement-summary strong{font-size:14px;font-weight:500;overflow-wrap:anywhere}.agreement-document section{margin:20px 0}.agreement-document h3{font-size:15px}.agreement-note{background:#f5f8fb;padding:10px 13px;border-radius:5px;white-space:pre-wrap}.agreement-attachment{display:flex;gap:14px;align-items:center;border-bottom:1px solid #e2eaf1;padding:10px 0}.agreement-attachment small{color:#788b9b;font-size:12px}.agreement-attachment button:first-child{margin-right:auto;overflow-wrap:anywhere;text-align:left}.agreement-upload{position:relative;overflow:hidden;cursor:pointer;display:inline-block!important}.agreement-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.agreement-history{border-top:1px solid #dce6ef;padding-top:13px;font-size:12px;color:#657d91}.agreement-history summary{cursor:pointer}.agreement-confirm{padding:18px 24px}.agreement-confirm h3{margin-top:0}.agreement-confirm p{line-height:1.7;color:#637a8e}@media(max-width:1200px){.agreement-filter{grid-template-columns:repeat(3,minmax(120px,1fr))}}@media(max-width:700px){.agreement-filter{grid-template-columns:repeat(2,minmax(100px,1fr))}.agreement-query-actions{grid-column:1/-1}.agreement-editor-grid,.agreement-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.agreement-pagination{gap:12px;align-items:flex-start;flex-direction:column}}
.agreement-page{overflow:visible}.agreement-filter{border-radius:8px 8px 0 0}.agreement-supplier-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;color:#587086}.agreement-supplier-picker{position:relative;min-width:0}.agreement-supplier-picker input{padding-right:35px!important}.agreement-supplier-search{position:absolute;right:1px;top:1px;bottom:1px;width:33px;border:0;border-radius:0 4px 4px 0;background:transparent;color:#6c94bd;cursor:pointer;display:flex;align-items:center;justify-content:center}.agreement-supplier-search:hover{color:#3b82c4;background:#edf5fc}.agreement-supplier-search svg{stroke:currentColor;stroke-width:1.8;fill:none}.agreement-supplier-picker:focus-within>input{border-color:#80b4e7;box-shadow:0 0 0 2px #e4f0fd}.agreement-supplier-list{position:absolute;left:0;top:calc(100% + 3px);z-index:100;width:max(100%,360px);max-width:calc(100vw - 36px);max-height:360px;overflow:auto;background:#fff;border:1px solid #d3dae2;border-radius:5px;box-shadow:0 4px 15px #23445f18;padding:5px 0;color:#213e57}.agreement-supplier-list[hidden]{display:none}.agreement-supplier-list [role=option]{padding:8px 15px;font-size:15px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}.agreement-supplier-list [role=option].selected{background:#458dcc;color:#fff}.agreement-supplier-hint{padding:12px 15px;color:#8192a3;font-size:12px;line-height:1.6}.agreement-editor-grid .agreement-supplier-picker input{height:36px}


/* Match the surrounding form controls and keep the supplier catalog unchanged. */
.agreement-filter .agreement-supplier-picker input{font:inherit;height:34px;border:1px solid #c7d7e6;color:#22394c}
.agreement-filter .agreement-supplier-picker input::placeholder{color:#8192a3}
.agreement-supplier-list,.agreement-supplier-list[popover]{box-sizing:border-box;max-height:330px;border:1px solid #d3dae2;border-radius:5px;box-shadow:0 4px 14px #23445f18;padding:5px 0;background:#fff;color:#334c66;text-align:left}
.agreement-supplier-list [role=option]{font:inherit;line-height:22px;min-height:32px;padding:5px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agreement-supplier-list [role=option].selected{background:#458dcc;color:#fff}.agreement-supplier-picker:after{display:none}
.agreement-contract-document{padding:18px 22px;max-height:65vh}.agreement-contract-document #agreementAttachmentSection{margin:0}.agreement-contract-document .agreement-section-head{margin:0 0 10px}.agreement-contract-document .hint{padding:8px 0}.agreement-contract-document .agreement-upload{color:#fff;background:#77a5d9;border-color:#77a5d9}

#agreementEditor .agreement-editor-lines table{min-width:0;width:100%;table-layout:fixed}
#agreementEditor .agreement-editor-lines th{width:auto;white-space:normal;padding:8px 4px;font-size:12px;line-height:1.5}
#agreementEditor .agreement-editor-lines td{padding:5px 3px;min-width:0}
#agreementEditor .agreement-editor-lines input{min-width:0;max-width:none;width:100%;padding:6px 5px;height:32px}
#agreementEditor .agreement-editor-lines [data-agreement-remove]{padding:3px;font-size:12px}

/* Compact, consistent business list controls. */
.agreement-table th:nth-child(7){width:94px}
.agreement-table th:nth-child(8){width:194px}
.agreement-table td:nth-child(7),.agreement-table td:nth-child(8){vertical-align:middle;text-align:center}
.agreement-table tbody tr:hover{background:#f3f7fb}
.agreement-actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:4px;min-width:0}
.agreement-actions .agreement-action-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 30px;padding:0;border:1px solid transparent;border-radius:5px;background:transparent;color:#58738b;cursor:pointer;transition:background-color .12s,color .12s,border-color .12s}
.agreement-actions .agreement-action-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.agreement-actions .agreement-action-icon:hover{color:#2f6ea7;background:#e8f0f8;border-color:#d6e4f1}
.agreement-actions .agreement-action-delete{color:#b96161}
.agreement-actions .agreement-action-delete:hover{color:#b43535;background:#fff0f0;border-color:#f2d4d4}
.agreement-actions .agreement-action-icon:focus-visible{outline:2px solid #528fbd;outline-offset:2px;background:#e8f0f8}
.agreement-actions .agreement-action-icon:disabled{opacity:.45;cursor:wait}
.agreement-table .row-status{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;padding:3px 8px;border-radius:4px;font-size:12px;font-weight:400;line-height:18px;color:#677787;background:#edf1f5}
.agreement-table .row-status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}
.agreement-table .row-status.is-active{color:#30755b;background:#edf6f1}
