.contract-workspace,.cw-dialog{font:14px/1.5 system-ui,-apple-system,sans-serif;color:#263344}.contract-workspace *,.cw-dialog *{box-sizing:border-box}.cw-heading,.cw-package header,.cw-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.contract-workspace h2,.cw-dialog h2{font-size:22px;letter-spacing:-.4px;margin:0}.contract-workspace h3{font-size:17px;margin:8px 0}.contract-workspace p{margin:8px 0}.cw-heading{margin-bottom:20px}.cw-heading p,.cw-muted,.cw-section-head p,.cw-package small{color:#687487;font-size:13px}.cw-notice{padding:16px 20px;border:1px solid #e9d8a8;border-radius:16px;background:linear-gradient(120deg,#fff8de,#fffdf6);font-size:13px}.cw-notice p{margin:4px 0 0}.cw-packages{display:grid;gap:16px}.cw-package,.cw-form{padding:24px;border:1px solid #e0e5ec;border-radius:22px;background:linear-gradient(145deg,#fff,#f8fafded);box-shadow:0 5px 18px #21304a06}.cw-package header strong{font-size:21px;white-space:nowrap;font-variant-numeric:tabular-nums}.cw-status{display:inline-block;font-size:12px;padding:4px 10px;border-radius:20px;background:#e9eff7;color:#435574}.cw-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.contract-workspace button,.cw-dialog button{font:inherit;font-size:13px;font-weight:550;padding:10px 15px;min-height:40px;border:1px solid #d6dce5;border-radius:12px;background:#fff;color:#263344;cursor:pointer;width:auto}.contract-workspace button:disabled{opacity:.45;cursor:not-allowed}.contract-workspace .cw-primary,.cw-dialog .cw-primary{background:linear-gradient(150deg,#ffe681,#f6c94b);border-color:#e8bd4c;color:#302a1d}.contract-workspace button:focus-visible,.cw-dialog button:focus-visible{outline:3px solid #c09b35;outline-offset:3px}.cw-package details{border-top:1px solid #e2e7ee;padding-top:12px}.cw-package summary{cursor:pointer;font-weight:550}.cw-stage-summary{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #e8ebf0}.cw-stage-summary small{display:block}.cw-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.cw-wide{grid-column:1/-1}.cw-form label,.cw-dialog label{display:flex;flex-direction:column;gap:7px;justify-content:flex-end;font-size:13px;font-weight:500;min-width:0}.cw-form input,.cw-form textarea,.cw-form select,.cw-dialog textarea{font:inherit;font-size:14px;color:#263344;background:#fff;border:1px solid #cfd7e2;border-radius:10px;padding:10px 12px;width:100%;min-width:0;min-height:42px}.cw-form textarea{resize:vertical}.cw-section-head{margin:24px 0 12px}.cw-stage{border:1px solid #dce2eb;border-radius:16px;padding:16px;margin:12px 0;background:#f5f7fb}.cw-stage legend{padding:0 8px;color:#657187}.cw-stage .cw-remove{margin-top:12px}.cw-feedback{color:#9e392e;min-height:20px}.cw-empty{padding:32px;text-align:center;color:#657187}.cw-dialog{border:1px solid #dce3eb;border-radius:22px;width:min(720px,calc(100vw - 24px));max-height:90dvh;padding:0;box-shadow:0 24px 80px #15213840}.cw-dialog::backdrop{background:#18243666;backdrop-filter:blur(5px)}.cw-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid #e3e7ed;gap:16px}.cw-dialog-body{padding:20px;overflow:auto}.cw-dialog .cw-check{flex-direction:row;align-items:flex-start;margin:16px 0;gap:12px}.cw-check input{width:18px;height:18px;flex:none}.cw-document{width:min(1100px,calc(100vw - 24px))}.cw-document iframe{width:100%;height:65dvh;border:1px solid #e4e8ed;margin-top:12px;background:white}.cw-form [hidden]{display:none!important}@media(max-width:600px){.cw-grid{grid-template-columns:minmax(0,1fr);gap:14px}.cw-package,.cw-form{padding:16px;border-radius:16px}.cw-heading h2,.cw-dialog h2{font-size:20px}.cw-actions button{flex:1 1 130px;min-height:44px}.cw-form input,.cw-form textarea,.cw-form select,.cw-dialog textarea{font-size:16px}.cw-stage-summary{flex-direction:column;gap:4px}.cw-dialog::backdrop{backdrop-filter:none}.cw-dialog-body{padding:16px}.cw-package header strong{font-size:19px}}

.cw-text-editor{margin:24px 0;padding:18px;border:1px solid #d6dce5;border-radius:16px;background:#fff}.cw-text-editor summary{font-weight:600;cursor:pointer}.cw-text-editor textarea{font:14px/1.65 system-ui,sans-serif;min-height:440px;resize:vertical}.cw-text-status{color:#685225}.kp-contract-dialog{width:min(1160px,calc(100vw - 24px));max-height:94dvh}.kp-contract-dialog>.cw-dialog-body{max-height:calc(94dvh - 85px);overflow:auto}@media(max-width:600px){.cw-text-editor{padding:12px}.cw-text-editor textarea{font-size:16px;min-height:360px}.kp-contract-dialog{max-height:96dvh}.kp-contract-dialog>.cw-dialog-body{padding:12px;max-height:calc(96dvh - 85px)}}

body.crm-staff dialog.cw-dialog[open]{position:fixed!important;inset:0!important;margin:auto!important;height:fit-content;max-height:94dvh;max-width:calc(100vw - 24px);display:flex;flex-direction:column}body.crm-staff dialog.cw-dialog>header{flex:0 0 auto}body.crm-staff dialog.cw-dialog>.cw-dialog-body{min-height:0;overflow:auto}
.cw-source-fields{margin:24px 0}.cw-source-fields>p,.cw-package-preview>p{color:#657187;font-size:13px}.cw-source-fields details,.cw-package-preview{margin:10px 0;border:1px solid #dce3eb;border-radius:14px;background:#fff;padding:14px}.cw-source-fields summary,.cw-package-preview summary{cursor:pointer;font-weight:600;min-height:28px}.cw-source-fields .cw-grid{margin-top:16px}.cw-source-fields input[readonly]{background:#f1f4f8;color:#526276;border-color:#e1e6ed}.cw-source-fields small{font-size:12px;color:#69798b;font-weight:400}.cw-package-preview iframe{display:block;width:100%;height:65dvh;border:1px solid #dce3eb;border-radius:10px;margin-top:12px;background:white}.cw-stage-summary{overflow-wrap:anywhere}
.cw-dialog .cw-document-link{display:flex;align-items:center;min-height:44px;margin:12px 0 6px;padding:10px 12px;border:1px solid #d6dfe9;border-radius:12px;background:linear-gradient(145deg,#fff,#eef3f9);color:#344d69;text-decoration:none;font-size:14px;font-weight:600;overflow-wrap:anywhere;box-shadow:inset 0 1px 0 #fff}.cw-dialog .cw-document-link:hover{background:#e7eef6}.cw-dialog .cw-document-link:focus-visible{outline:3px solid #c09b35;outline-offset:2px}
