#modal:has(#agreementBatchForm){width:min(1500px,96vw);max-width:96vw;height:92vh;max-height:96vh;padding:0;border-radius:5px}#modal:has(#agreementBatchForm) #dialogBody{display:flex;flex-direction:column;height:100%;max-height:none;overflow:hidden}#modal:has(#agreementBatchForm) .dialog-head{flex:0 0 56px;position:relative;justify-content:flex-end;gap:18px;background:#f7f9fc;border-bottom:3px solid #68aaf2}#modal:has(#agreementBatchForm) .dialog-head>span{position:absolute;left:50%;transform:translateX(-50%);font-size:17px;font-weight:600;color:#253d55}.agreement-batch-max{font-size:24px!important}#modal.agreement-batch-maximized:has(#agreementBatchForm){width:98vw;max-width:98vw;height:96vh}#agreementBatchForm{display:flex;flex-direction:column;flex:1;min-height:0;margin:0}.agreement-batch-body{padding:16px;flex:1;min-height:0;overflow:auto;background:#fff}.agreement-batch-meta{display:grid;grid-template-columns:110px minmax(180px,1fr) 110px minmax(180px,1fr);border:1px solid #cbd5df;align-items:stretch;margin-bottom:18px}.agreement-batch-meta>label:not(.agreement-batch-switch){display:flex;align-items:center;justify-content:flex-end;background:#eff5fc;color:#255982;font-size:14px;font-weight:600;padding:6px 10px;border-bottom:1px solid #d7e1eb}.agreement-batch-meta>input,.agreement-batch-meta>select{margin:3px;width:calc(100% - 6px);min-width:0;height:37px;border:1px solid #b1cced;border-radius:5px;padding:6px 10px;color:#36556e;background:white;font-size:14px}.agreement-batch-meta>.agreement-supplier-field{margin:3px;gap:0}.agreement-batch-meta>.agreement-supplier-field>label{display:none}.agreement-batch-meta .agreement-supplier-picker input{height:37px;width:100%;border:1px solid #b1cced;border-radius:5px;padding:6px 10px;color:#36556e;background:white;font-size:14px}.agreement-batch-switch{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:7px;padding:4px 7px;position:relative;color:#3585c5;font-size:13px}.agreement-batch-switch input{position:absolute;left:7px;width:60px;height:30px;opacity:0;cursor:pointer}.agreement-batch-switch span{height:30px;width:60px;background:#a9b9c7;border-radius:18px;pointer-events:none}.agreement-batch-switch span:after{content:'';display:block;width:24px;height:24px;margin:3px;background:white;border-radius:50%;transition:transform .15s}.agreement-batch-switch input:checked+span{background:#3892ed}.agreement-batch-switch input:checked+span:after{transform:translateX(30px)}.agreement-batch-switch input:focus-visible+span{outline:2px solid #2e78bd;outline-offset:2px}.agreement-batch-switch b{font-weight:500}.agreement-batch-toolbar{margin:0 0 8px}.agreement-batch-toolbar .btn{background:#36aecb;border-color:#36aecb;color:white;font-weight:600;border-radius:3px}.agreement-batch-period{margin-bottom:25px}.agreement-batch-dates{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:3px}.agreement-batch-dates label{font-size:14px;font-weight:600;color:#255982;background:#f0f5fa;padding:8px 10px}.agreement-batch-dates input{width:230px;max-width:100%;height:37px;border:1px solid #b1cced;border-radius:5px;padding:6px 10px;color:#36556e}.agreement-batch-remove-period,.agreement-batch-remove-row{border:0;background:none;color:#f34c59;padding:5px;cursor:pointer}.agreement-batch-remove-period svg,.agreement-batch-remove-row svg{stroke:currentColor;stroke-width:1.8;fill:none}.agreement-batch-table-wrap{overflow:auto}.agreement-batch-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}.agreement-batch-table th,.agreement-batch-table td{border:1px solid #ccd5df;text-align:center;padding:3px!important}.agreement-batch-table th{height:48px;background:#eef1f5;color:#213c55;font-size:14px;font-weight:600;border-bottom:2px solid #e8bd46}.agreement-batch-table td{height:43px}.agreement-batch-table input{height:35px;width:100%;min-width:0;border:1px solid #b8cfe9;border-radius:4px;padding:6px 9px;font-size:13px;color:#36566f}.agreement-batch-table .agreement-supplier-field>label{display:none}.agreement-batch-table .agreement-supplier-field{gap:0}.agreement-batch-free{display:flex;align-items:center;gap:4px}.agreement-batch-free input{flex:1;width:0}.agreement-batch-free span{font-size:13px;color:#30516d}.agreement-batch-add-row{border:0;background:#7976ef;box-shadow:0 3px 7px #b7b5e9;color:white;border-radius:3px;min-width:48px;height:33px;font-size:25px;line-height:1;cursor:pointer}.agreement-batch-hint{font-size:12px;line-height:1.6;color:#7b8fa2;margin:12px 0}.agreement-batch-footer{display:flex;justify-content:flex-end;gap:20px;flex-shrink:0;background:#e5edfa;border-top:1px solid #d5e0ee;padding:12px 35px}.agreement-batch-footer .btn{height:36px;min-width:90px;font-size:14px;font-weight:600;border-radius:3px}.agreement-batch-save{background:#f7bc19!important;border-color:#f7bc19!important;color:#2b4d65!important}.agreement-batch-close{background:#f85c85!important;border-color:#f85c85!important;color:white!important}.agreement-document table.agreement-detail-prices{min-width:1100px}#agreementEditor .agreement-editor-lines table{min-width:0}@media(max-width:800px){.agreement-batch-meta{grid-template-columns:100px minmax(140px,1fr)}.agreement-batch-body{padding:10px}.agreement-batch-dates input{width:170px}.agreement-batch-dates{gap:5px}.agreement-batch-footer{padding:10px 16px}}
.agreement-batch-dates>.query-date-input{width:230px;flex:0 1 230px;max-width:100%}.agreement-batch-dates>.query-date-input input{width:100%}@media(max-width:800px){.agreement-batch-dates>.query-date-input{width:170px;flex-basis:170px}}

/* Match the compact cost-template editor and the existing OA dialogs. */
#modal:has(#agreementBatchForm){width:1120px;max-width:94vw;height:fit-content;max-height:86vh;border-radius:8px}
#modal:has(#agreementBatchForm) #dialogBody{height:auto;max-height:86vh}
#modal:has(#agreementBatchForm) .dialog-head{flex:0 0 54px;padding:14px 22px;background:#edf4fb;border-bottom:1px solid #dbe5ee;gap:12px}
#modal:has(#agreementBatchForm) .dialog-head>span{position:static;transform:none;margin-right:auto;font-size:16px;font-weight:500;color:#334c66}
#modal.agreement-batch-maximized:has(#agreementBatchForm){width:94vw;max-width:94vw;height:90vh;max-height:90vh}
#modal.agreement-batch-maximized:has(#agreementBatchForm) #dialogBody{height:100%;max-height:90vh}
#agreementBatchForm{flex:0 1 auto}.agreement-batch-body{flex:0 1 auto;padding:20px 22px}.agreement-batch-meta{border:0;grid-template-columns:100px minmax(160px,1fr) 100px minmax(160px,1fr);gap:12px 10px;margin-bottom:18px;align-items:center}
.agreement-batch-meta>label:not(.agreement-batch-switch){font-size:13px;font-weight:400;background:none;color:#587086;padding:0;border:0}
.agreement-batch-meta>input,.agreement-batch-meta>select{margin:0;width:100%;height:34px;border-color:#c7d7e6;border-radius:4px;font:inherit;color:#33546f}
.agreement-batch-meta>.agreement-supplier-field{margin:0}.agreement-batch-meta .agreement-supplier-picker input{height:34px;border-color:#c7d7e6;border-radius:4px;font:inherit;color:#33546f}
.agreement-batch-switch{padding:0;gap:8px;color:#587086}.agreement-batch-switch input{left:0;width:42px;height:24px;margin:0}.agreement-batch-switch span{width:42px;height:24px}.agreement-batch-switch span:after{width:18px;height:18px}.agreement-batch-switch input:checked+span{background:#77a5d9}.agreement-batch-switch input:checked+span:after{transform:translateX(18px)}
.agreement-batch-toolbar .btn{background:white;color:#6083a6;border-color:#cddceb;font-weight:400;height:34px}
.agreement-batch-period{margin-bottom:16px}.agreement-batch-dates{padding:8px 0;margin-bottom:5px;gap:8px}.agreement-batch-dates label{font-weight:400;font-size:13px;color:#587086;background:none;padding:0 5px 0 0}.agreement-batch-dates input{height:34px;border-color:#c7d7e6;font:inherit}.agreement-batch-dates>.query-date-input{width:185px;flex-basis:185px}
.agreement-batch-table{min-width:0}.agreement-batch-table th{height:40px;border-bottom:1px solid #dbe4ed;background:#edf4fb;font-size:13px;font-weight:500;color:#587086}.agreement-batch-table td{height:44px}.agreement-batch-table th,.agreement-batch-table td{border-color:#e3eaf1;padding:5px!important}.agreement-batch-table input{height:32px;border-color:#c7d7e6;font:inherit;padding:5px 8px}
.agreement-batch-add-row{height:27px;min-width:32px;width:32px;background:#e7f0fa;color:#4c80b2;border:1px solid #c5d9ec;border-radius:4px;box-shadow:none;font-size:22px}.agreement-batch-remove-period,.agreement-batch-remove-row{color:#ca5c64}.agreement-batch-remove-period svg,.agreement-batch-remove-row svg{width:19px;height:19px}
.agreement-batch-footer{background:#f7f9fc;border-color:#dbe5ee;padding:12px 22px;gap:10px}.agreement-batch-footer .btn{height:34px;min-width:76px;font-size:13px;font-weight:400;border-radius:4px}.agreement-batch-save{background:#77a5d9!important;border-color:#77a5d9!important;color:white!important}.agreement-batch-close{background:white!important;border-color:#cddceb!important;color:#6083a6!important}.agreement-batch-max{font-size:20px!important}
@media(max-width:800px){.agreement-batch-meta{grid-template-columns:92px minmax(120px,1fr);gap:10px}.agreement-batch-body{padding:16px}.agreement-batch-footer{padding:10px 16px}}
