/* Page editor (Sign / Edit / Crop PDF), signature pad and QR preview. */
.ed-pages{display:flex;flex-direction:column;align-items:center;gap:6px;margin:16px 0}
.ed-bar{position:sticky;top:64px;z-index:6;display:flex;flex-wrap:wrap;align-items:center;gap:8px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:10px 12px;margin-bottom:10px;width:100%;max-width:820px}
.ed-bar button{border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px 12px;font:inherit;font-weight:600;font-size:.88rem;cursor:pointer;color:var(--title)}
.ed-bar button.on{background:var(--tint);border-color:var(--accent);color:var(--accent-dark)}
.ed-hint{font-size:.82rem;color:var(--muted);flex:1;min-width:200px}
.ed-num{font-size:.8rem;color:var(--muted);margin-top:10px}
.ed-page{position:relative;max-width:100%;box-shadow:var(--shadow);background:#fff;touch-action:none;user-select:none;cursor:crosshair}
.ed-page > img{display:block;width:100%;height:auto;pointer-events:none}
.ed-item{position:absolute;cursor:move;line-height:1;white-space:pre}
.ed-item img{display:block;width:100%;height:100%;pointer-events:none}
.ed-text{font-family:Helvetica,Arial,sans-serif;outline:1px dashed transparent}
.ed-item:hover{outline:1px dashed var(--accent)}
.ed-white{background:#fff;outline:1px dashed #b0b0ba}
.ed-crop{outline:2px dashed var(--accent);box-shadow:0 0 0 9999px rgba(20,20,30,.35);cursor:default}
.ed-x{position:absolute;top:-10px;right:-10px;width:20px;height:20px;border-radius:50%;border:none;background:#c62828;color:#fff;font-size:11px;line-height:20px;padding:0;cursor:pointer;display:none}
.ed-item:hover .ed-x{display:block}
.ed-rs{position:absolute;right:-5px;bottom:-5px;width:12px;height:12px;background:var(--accent);border-radius:3px;cursor:nwse-resize}
.ed-page{overflow:hidden}
@media (pointer:coarse){.ed-x{display:block}}

.sig-box{max-width:620px}
.sig-tabs{margin:6px 0 10px}
.sig-pad{width:100%;height:auto;border:1px dashed var(--border);border-radius:10px;background:#fff;touch-action:none;cursor:crosshair}
.sig-name{width:100%;padding:11px 12px;border:1px solid var(--border);border-radius:8px;font:inherit;margin-top:10px}
.sig-acts{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.sig-acts .btn{width:auto}

.qr-box{display:flex;flex-direction:column;align-items:center;gap:12px;margin:16px 0}
.qr-preview{width:240px;height:240px;border:1px solid var(--border);border-radius:12px;background:#fff;image-rendering:pixelated}
input[type=color]{width:56px;height:36px;padding:2px;border:1px solid var(--border);border-radius:8px;background:#fff}
