/* PDF signer: shared by the CRM editor and the customer signing page */
.ce-pages{display:flex;flex-direction:column;align-items:center;gap:18px;padding:12px;min-width:0;flex:1}
.ce-pg{position:relative;background:#fff;box-shadow:0 2px 14px rgba(18,26,36,.14);touch-action:pan-y}
.ce-pg canvas{display:block;width:100%;height:100%}
.ce-layer{position:absolute;inset:0}
.ce-pgnum{position:absolute;right:0;bottom:-18px;font-size:11px;color:#6b7684}
.ce-fld{position:absolute;box-sizing:border-box;border:1.5px solid #3b82f6;background:rgba(59,130,246,.16);border-radius:4px;display:flex;align-items:center;overflow:hidden;cursor:move;font:600 11px/1.1 Inter,Arial,sans-serif;color:#0b3a8a;padding:0 4px;touch-action:none;user-select:none}
.ce-fld span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.ce-fld img{max-width:100%;max-height:100%;pointer-events:none}
.ce-fld.r-contractor{border-color:#e08a00;background:rgba(245,158,11,.16);color:#7a4a00}
.ce-fld.r-auto{border-color:#e08a00;background:rgba(255,237,213,.75);color:#5b3600;font-weight:500}
.ce-fld.t-checkbox{justify-content:center;padding:0}
.ce-fld.sel{outline:2px solid #121a24;outline-offset:1px;z-index:3}
.ce-fld .rz{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;background:#121a24;border-radius:3px 0 3px 0;cursor:nwse-resize;touch-action:none}
/* editor chrome */
.ce-sign-top{position:sticky;top:60px;z-index:30;display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fff;border-bottom:1px solid #e3e7ec;margin:0 -24px;padding:10px 24px}
.ce-sign-top>a{text-decoration:none;font-weight:600}
.ce-sign-top #ce-title{font:600 17px inherit;border:1px solid transparent;border-radius:8px;padding:6px 8px;min-width:240px}
.ce-sign-top #ce-title:hover,.ce-sign-top #ce-title:focus{border-color:#cfd6de}
.ce-sign-top .sp{flex:1}.ce-sign-top .small{font-size:13px}
.ce-sign-wrap{display:flex;gap:16px;align-items:flex-start;margin-top:14px}
.ce-sign-wrap .ce-pages{background:#e9edf1;border-radius:12px;padding:20px 12px 30px}
.ce-palette{position:sticky;top:130px;width:290px;flex:none;max-height:calc(100vh - 150px);overflow:auto;background:#fff;border:1px solid #e3e7ec;border-radius:14px;padding:4px 14px 14px}
.ce-palette h3{font-size:16px;margin:14px 0 2px}.ce-palette h3 small{font-weight:500;color:#6b7684;font-size:12px}.ce-palette h4{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#6b7684;margin:12px 0 6px}
.ce-palette .ce-muted{font-size:13px;margin:2px 0 8px}
.ce-pal{display:block;width:100%;text-align:left;margin:6px 0;padding:11px 12px;border-radius:9px;border:1px solid #bcd3fb;background:#e7f0ff;color:#0b3a8a;font:600 14px inherit;cursor:grab}
.ce-pal.r-contractor{background:#fff4e0;border-color:#f6cf8c;color:#7a4a00}.ce-pal.r-auto{background:#fff1e3;border-color:#f8c99b;color:#5b3600;font-weight:500}
.ce-roles{display:flex;border-bottom:1px solid #e3e7ec;margin-bottom:6px}.ce-roles button{flex:1;border:0;background:none;padding:9px;font:600 14px inherit;color:#5a6573;border-bottom:2px solid transparent;cursor:pointer}.ce-roles button.on{color:#0a66d8;border-color:#0a66d8}
.ce-sel{background:#f6f8fa;border-radius:10px;padding:4px 12px 8px;margin-top:10px}.ce-sel label{display:block;margin:8px 0}.ce-sel label span{display:block;font-size:12px;font-weight:600;color:#5a6573}
.ce-sel input:not([type=checkbox]){width:100%;box-sizing:border-box;border:1px solid #cfd6de;border-radius:8px;padding:8px}
.ce-sigprev{background:#fff;border:1px dashed #cfd6de;border-radius:8px;height:60px;display:flex;align-items:center;justify-content:center;margin:8px 0}.ce-sigprev img{max-height:54px;max-width:100%}
.ce-sign-note{margin:10px 0 0}
@media(max-width:900px){.ce-sign-top{top:0;margin:0 -12px;padding:10px 12px}.ce-sign-wrap{flex-direction:column}.ce-palette{position:static;width:auto;max-height:none;order:-1}.ce-sign-wrap .ce-pages{width:100%;box-sizing:border-box;padding:12px 6px}}
/* customer signing */
.wrap .ce-pages{padding:18px 0}
.ce-fixed{position:absolute;display:flex;align-items:center;font:12px/1.1 Helvetica,Arial,sans-serif;color:#0f2140;overflow:hidden;white-space:nowrap}.ce-fixed img{max-height:100%;max-width:100%}
.ce-in{position:absolute;box-sizing:border-box;border:2px solid #f59e0b;background:rgba(254,243,199,.85);border-radius:4px;display:flex;align-items:center;justify-content:center;animation:cepulse 2s infinite}
.ce-in.done{border-color:#16a34a;background:rgba(220,252,231,.55);animation:none}
.ce-in:not(.req){border-style:dashed}
.ce-in input{width:100%;height:100%;border:0;background:transparent;font:12px Helvetica,Arial,sans-serif;color:#0f2140;padding:0 3px;box-sizing:border-box;min-width:0}
.ce-in input[type=checkbox]{width:80%;height:80%;margin:0}
.ce-in button{width:100%;height:100%;border:0;background:transparent;font:700 12px Arial,sans-serif;color:#92400e;cursor:pointer}
.ce-in img{max-width:100%;max-height:100%;cursor:pointer}
@keyframes cepulse{50%{box-shadow:0 0 0 4px rgba(245,158,11,.25)}}
.ce-finish{position:sticky;bottom:0;margin-top:10px;box-shadow:0 -6px 30px rgba(18,26,36,.12)}
.ce-finish .chk{display:block;margin:10px 0 14px}
.err-txt{color:#b42318;font-weight:600;margin:10px 0 0}
.ce-modal{position:fixed;inset:0;background:rgba(10,15,22,.55);z-index:9999;display:flex;align-items:center;justify-content:center;padding:12px}
.ce-modal-box{background:#fff;border-radius:16px;width:min(640px,100%);padding:20px;box-sizing:border-box;font-family:Inter,Arial,sans-serif}
.ce-modal-box h3{margin:0 0 12px;font-size:20px;color:#121a24}
.ce-tabs{display:flex;gap:6px;margin-bottom:10px}.ce-tabs button{padding:8px 16px;border-radius:999px;border:1px solid #cfd6de;background:#fff;font:600 14px inherit;cursor:pointer}.ce-tabs button.on{background:#121a24;color:#fff;border-color:#121a24}
.ce-pad{width:100%;height:auto;aspect-ratio:900/260;border:1.5px dashed #9aa6b2;border-radius:10px;touch-action:none;background:#fcfcfd;display:block}
.linkbtn{border:0;background:none;color:#0a66d8;font:600 14px inherit;padding:8px 0;cursor:pointer}
.ce-typed{width:100%;box-sizing:border-box;padding:12px;border:1px solid #cfd6de;border-radius:10px;font-size:16px}
.ce-typed-prev{font:italic 48px "Brush Script MT","Segoe Script","Snell Roundhand",cursive;color:#10203a;padding:16px 8px;min-height:70px;border-bottom:1.5px solid #121a24;margin-top:10px;overflow:hidden;white-space:nowrap}
.ce-modal-acts{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.ce-modal-acts button{padding:12px 20px;border-radius:10px;font:600 15px inherit;cursor:pointer;border:1px solid #cfd6de;background:#fff}
.ce-modal-acts .ce-adopt{background:#0a66d8;color:#fff;border-color:#0a66d8}
@media(max-width:640px){.ce-finish{position:static}.ce-finish .chk{font-size:15px}}
/* Fill & sign mode */
body.ce-filling .ce-palette{display:none}
body.ce-filling .ce-sign-wrap .ce-pages{background:#26313b}
.ce-sign-top .ce-toggle{margin-left:8px}
.ce-banner{position:sticky;top:122px;z-index:20;display:flex;align-items:center;gap:14px;justify-content:space-between;max-width:760px;margin:14px auto 0;background:#fff;border:1px solid #e3e7ec;border-radius:12px;padding:12px 16px;box-shadow:0 6px 24px rgba(18,26,36,.12);font-size:15px}
.ce-banner:empty{display:none}.ce-banner small{color:#6b7684}.ce-banner.ok{border-color:#b7e3c7;background:#f1fbf4;color:#1f5c38}
.ce-banner .ce-btn{flex:none}
.ce-ph{position:absolute;box-sizing:border-box;border:1.5px dashed #3b82f6;background:rgba(59,130,246,.08);border-radius:4px;display:flex;align-items:center;padding:0 4px;overflow:hidden;font:600 10px Arial,sans-serif;color:#0b3a8a;white-space:nowrap}
.ce-pg .ce-in input{font-size:12px}
@media(max-width:900px){.ce-banner{top:auto;position:static;flex-direction:column;align-items:flex-start}}
.ce-sign-top{gap:8px;flex-wrap:nowrap}.ce-sign-top .ce-btn{height:38px;padding:0 14px;white-space:nowrap}.ce-sign-top #ce-title{min-width:0;width:220px}
.ce-sign-top .ce-toggle button{height:36px;line-height:36px;white-space:nowrap}.ce-sign-top #ce-saved{white-space:nowrap;font-size:13px}
@media(max-width:1200px){.ce-sign-top{flex-wrap:wrap}.ce-banner{top:auto;position:static}}
.ce-banner.err{border-color:#f3b8b2;background:#fff5f4;color:#8a1c12}
