:root{--bg:#eef2f7;--panel:#fff;--line:#dfe5ee;--ink:#101828;--text:#344054;--muted:#667085;--brand:#2764ff;--brand2:#7c4dff;--danger:#d92d20;--green:#12a67a}*{box-sizing:border-box}html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--bg);overflow:hidden;-webkit-font-smoothing:antialiased}.editor-app{height:100vh;display:grid;grid-template-rows:64px 58px 1fr}.editor-top{display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);box-shadow:0 2px 18px rgba(15,23,42,.04);z-index:30}.editor-brand,.editor-actions{display:flex;align-items:center;gap:10px}.editor-brand>a{width:36px;height:36px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;text-decoration:none;color:#344054;background:#fff}.editor-brand strong{font-size:15px;color:var(--ink);letter-spacing:-.02em}.save-state{padding:6px 9px;border-radius:999px;background:#f3f5f8;color:#7b8497;font-size:9px}.e-btn,.editor-toolbar button,.editor-toolbar label,.mini,.page-actions button{border:1px solid #dbe1eb;background:#fff;color:#475467;border-radius:9px;padding:8px 10px;cursor:pointer;font-size:10px;font-weight:800;transition:.14s}.e-btn:hover,.editor-toolbar button:hover,.editor-toolbar label:hover,.mini:hover,.page-actions button:hover{border-color:#b8c6ff;background:#f6f8ff}.e-btn.primary{border:0;background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;padding:10px 15px;box-shadow:0 8px 22px rgba(39,100,255,.2)}.e-btn.ghost{background:#f8f9fb}.editor-toolbar{display:flex;align-items:center;gap:5px;padding:9px 12px;background:#fbfcfe;border-bottom:1px solid var(--line);overflow-x:auto;white-space:nowrap;z-index:20}.editor-toolbar button.active{background:#eaf0ff;border-color:#aebfff;color:#3155d7}.editor-layout{min-height:0;display:grid;grid-template-columns:200px minmax(440px,1fr) 265px}.image-layout{grid-template-columns:minmax(440px,1fr) 265px}.pages-panel,.properties-panel{background:#fff;min-height:0;overflow:auto}.pages-panel{border-right:1px solid var(--line)}.properties-panel{border-left:1px solid var(--line);padding:16px}.pages-head{height:50px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f4;position:sticky;top:0;background:#fff;z-index:4;font-size:10px}.mini{padding:5px 7px;font-size:8px}.thumb{margin:11px;padding:5px;border:2px solid transparent;border-radius:10px;background:#f6f8fb;cursor:pointer}.thumb.active{border-color:var(--brand);background:#eef3ff}.thumb canvas{width:100%;display:block;border-radius:5px;background:#fff;box-shadow:0 3px 10px rgba(15,23,42,.08)}.thumb small{display:block;text-align:center;font-size:8px;color:#7c8597;margin-top:5px}.canvas-stage{position:relative;overflow:auto;background:radial-gradient(circle at 50% 20%,#f7f9fc 0,#e9eef5 74%);padding:32px}.pages-canvas{width:max-content;min-width:100%;display:flex;flex-direction:column;align-items:center;gap:24px}.pdf-page{position:relative;transform-origin:top center;box-shadow:0 13px 38px rgba(15,23,42,.17);background:#fff;border-radius:3px}.pdf-page canvas{display:block}.overlay-layer{position:absolute;inset:0}.ann{position:absolute;min-width:12px;min-height:12px;cursor:move;border:1px solid transparent}.ann.selected{outline:2px solid var(--brand);outline-offset:1px}.ann .resize{position:absolute;right:-6px;bottom:-6px;width:10px;height:10px;border:2px solid var(--brand);border-radius:50%;background:#fff;cursor:nwse-resize}.ann.link{border:1.5px dashed var(--brand);background:rgba(39,100,255,.06)}.ann.highlight{background:rgba(255,218,61,.5)}.ann.whiteout{background:#fff;border:1px dashed #c4c7d0}.ann.rect{border:2px solid #e5484d}.ann.ellipse{border:2px solid #e5484d;border-radius:50%}.ann.formtext,.ann.dropdown{border:1px solid #8f95a6;background:rgba(255,255,255,.86);padding:2px 5px;font-size:10px}.ann.checkbox,.ann.radio{display:grid;place-items:center;border:1px solid #7f8595;background:#fff}.ann.radio{border-radius:50%}.ann.image img,.ann.signature img{width:100%;height:100%;object-fit:contain;pointer-events:none}.editor-empty{max-width:600px;margin:9vh auto 0;padding:42px;text-align:center;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.1)}.upload-orb{width:76px;height:76px;margin:0 auto 18px;border-radius:21px;background:linear-gradient(135deg,#eaf1ff,#f2ebff);display:grid;place-items:center;color:var(--brand);font-weight:900;letter-spacing:.04em}.editor-empty h1{margin:0 0 10px;color:var(--ink);font-size:30px;letter-spacing:-.04em}.editor-empty p{margin:0 0 20px;color:var(--muted);font-size:12px;line-height:1.7}.editor-empty small{display:block;margin-top:14px;color:#98a2b3;font-size:9px}.btn{border:0;padding:11px 16px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-weight:850}.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff}.properties-panel>strong,.page-actions>strong{display:block;font-size:10px;margin-bottom:10px}.properties-panel label{display:block;margin:9px 0 5px;color:#667085;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.properties-panel input,.properties-panel select{width:100%;padding:8px;border:1px solid #dfe3eb;border-radius:8px;outline:0}.properties-panel hr{border:0;border-top:1px solid #eceff3;margin:18px 0}.page-actions{display:grid;gap:7px}.page-actions button{width:100%;text-align:left}.page-actions .danger{color:var(--danger)}.muted{color:var(--muted);font-size:10px;line-height:1.55}.signature-modal{position:fixed;inset:0;z-index:80;background:rgba(15,23,42,.5);backdrop-filter:blur(5px);display:grid;place-items:center}.signature-modal[hidden]{display:none}.signature-box{width:min(600px,calc(100vw - 28px));padding:17px;border-radius:19px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.28)}.sig-head,.sig-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.sig-head button{border:0;background:transparent;font-size:24px}.signature-box canvas{width:100%;height:180px;margin:14px 0;border:1px dashed #cfd5df;border-radius:12px;touch-action:none}.sig-actions{justify-content:flex-end}.editor-toast{position:fixed;left:50%;bottom:24px;z-index:100;transform:translate(-50%,25px);padding:10px 14px;border-radius:10px;background:#172033;color:#fff;font-size:10px;opacity:0;pointer-events:none;transition:.2s}.editor-toast.show{opacity:1;transform:translate(-50%,0)}.image-work{height:100%;min-height:520px;place-items:center}.image-work[hidden]{display:none}.image-work:not([hidden]){display:grid}.image-work canvas{max-width:100%;max-height:calc(100vh - 170px);background:#fff;box-shadow:0 15px 48px rgba(15,23,42,.2)}.img-props{display:grid;gap:9px}.img-tools{display:flex;gap:5px;flex-wrap:nowrap}
@media(max-width:980px){.editor-layout,.image-layout{grid-template-columns:150px minmax(420px,1fr)}.image-layout{grid-template-columns:1fr}.properties-panel{display:none}.save-state{display:none}}@media(max-width:720px){.editor-app{grid-template-rows:58px 52px 1fr}.editor-layout,.image-layout{grid-template-columns:1fr}.pages-panel{display:none}.canvas-stage{padding:18px}.editor-brand strong{font-size:13px}.editor-actions #zoomLabel{display:none}.editor-toolbar{padding:7px}.editor-toolbar button,.editor-toolbar label{padding:7px 9px}.editor-empty{margin:7vh 10px 0;padding:26px}.editor-empty h1{font-size:24px}}
#nativePreview{display:block;max-width:min(100%,1100px);max-height:calc(100vh - 180px);object-fit:contain;background:#fff;box-shadow:0 15px 48px rgba(15,23,42,.2);border-radius:4px}#nativePreview[hidden]{display:none}

/* v6.2 editor readability */
body{font-size:14px}.editor-brand strong{font-size:16px}.save-state{font-size:12px}.editor-toolbar button,.e-btn{font-size:13px}.properties-panel,.pages-panel{font-size:13px}.properties-panel strong,.pages-head strong{font-size:14px}.editor-empty h1{font-size:30px}.editor-empty p{font-size:14px;line-height:1.6}.editor-empty small{font-size:11.5px}.img-props label{font-size:12px}
