.pde{--pd-accent:var(--pt-cyan,#63d7e5);--pd-line:var(--pt-border,#343b48);--pd-bg:var(--pt-surface,#171b23);--pd-sub:var(--pt-surface-2,#212733);--pd-text:var(--pt-text,#eee);color:var(--pd-text)}.pde-beta{font-size:.65rem;vertical-align:middle;color:var(--pt-cyan);border:1px solid var(--pt-border);border-radius:6px;padding:3px 7px;letter-spacing:.06em}.pde [hidden]{display:none!important}.pde-empty{min-height:clamp(300px,55vh,650px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center}.pde-empty svg{color:var(--pd-accent)}.pde-empty p{max-width:520px;margin:0 0 12px;color:var(--pt-muted)}.pde-empty h2{font-size:1.45rem;margin:0}.pde-status{padding:8px 2px;min-height:30px;color:var(--pt-muted)}.pde-status[data-error=true]{color:var(--pt-danger,#eb7580)}.pde-toolbar,.pde-panel-head,.pde-page-actions,.pde-layer-actions,.pde-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:7px 9px;flex-wrap:wrap}.pde-toolbar{margin-bottom:8px}.pde-tools{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.pde button:not(.btn){border:1px solid var(--pd-line);border-radius:5px;padding:5px 8px;background:var(--pd-sub);color:var(--pd-text);font-size:.78rem;line-height:1.25;white-space:nowrap}.pde button:not(.btn):hover,.pde button[aria-pressed=true]{border-color:var(--pd-accent);color:var(--pd-accent)}.pde button:disabled{opacity:.45;cursor:not-allowed}.pde button.pde-primary{background:var(--pt-gradient);color:white;border:0;font-weight:600}.pde-tools svg{width:17px;height:17px;vertical-align:-4px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.pde-grid{display:grid;grid-template-columns:minmax(135px,16%) minmax(0,1fr) minmax(230px,24%);gap:8px;height:clamp(380px,calc(100dvh - 245px),820px)}.pde-grid>.pt-panel{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.pde-panel-head{border-bottom:1px solid var(--pd-line);min-height:38px}.pde-panel-head h2{font-size:.9rem;font-weight:650;margin:0}.pde-scroll{overflow:auto;min-height:0;overscroll-behavior:contain}.pde-pages .pde-scroll{flex:1;padding:6px}.pde-page{display:flex!important;flex-direction:column;align-items:center;gap:5px;width:100%;margin-bottom:7px;padding:6px!important}.pde-page img{max-width:100%;max-height:105px;object-fit:contain;background:#fff;box-shadow:0 2px 4px #0005}.pde-page.active,.pde-layer.active{border-color:var(--pd-accent)!important;background:color-mix(in srgb,var(--pd-accent) 12%,var(--pd-sub))!important}.pde-page-actions,.pde-layer-actions{border-top:1px solid var(--pd-line);justify-content:center}.pde-stage{position:relative;flex:1;min-height:0;overflow:auto;background:#303641;padding:18px;display:flex;align-items:safe center;justify-content:safe center;overscroll-behavior:contain}.pde-surface{position:relative;flex:none;box-shadow:0 4px 18px #0008;background:repeating-conic-gradient(#bbb 0% 25%,#eee 0% 50%) 0/16px 16px}.pde-surface canvas{display:block;width:100%;height:100%}.pde-surface #pdeOverlay{position:absolute;inset:0;touch-action:none;outline:none;cursor:move}.pde-hint{padding:6px 9px;color:var(--pt-muted);border-top:1px solid var(--pd-line)}.pde-layers{flex:0 1 27%;min-height:58px;padding:5px}.pde-layer{display:flex;align-items:center;gap:5px;border:1px solid var(--pd-line);border-radius:5px;background:var(--pd-sub);margin:3px 0;padding:4px;cursor:pointer}.pde-layer span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem}.pde-layer img{width:26px;height:26px;object-fit:contain;background:#d8d8d8}.pde-layer button{padding:3px!important;min-width:24px}.pde-properties{flex:1;padding:9px;min-height:0}.pde-properties label,.pde-dialog label{display:block;font-size:.77rem;margin-bottom:7px}.pde-properties .form-control,.pde-properties .form-select{font-size:.78rem;padding:4px 6px;min-height:27px}.pde-pairs{display:grid;grid-template-columns:1fr 1fr;gap:0 7px}.pde-check{display:flex!important;align-items:center;gap:4px}.pde-bottom{border-top:1px solid var(--pd-line);padding:8px}.pde-inline{position:absolute;z-index:3;padding:0;border:1px dashed #08a9cc;background:#fff;color:#111;resize:none;box-sizing:border-box;transform-origin:0 0;outline:none;line-height:1.2}.pde-dialog{color:var(--pd-text);background:var(--pd-bg);border:1px solid var(--pd-line);border-radius:12px;width:min(470px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:0}.pde-dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}.pde-dialog-body{padding:14px}.pde-dialog label{font-size:.9rem;margin-bottom:12px}.pde-dialog-actions{justify-content:flex-end;border-top:1px solid var(--pd-line);padding:12px}.pde-export-size{padding:9px;border:1px solid var(--pd-line);border-radius:6px;background:var(--pd-sub);font-size:.85rem}.pde-export-size strong{float:right;color:var(--pd-accent)}.pde-export-size small{clear:both;color:var(--pt-muted)}.pde [data-error=true]{color:var(--pt-danger)}.pde-stage:has(.pde-inline){user-select:text}.pde-layer:focus-visible{outline:2px solid var(--pd-accent)}@media(max-width:991px){.pde-grid{grid-template-columns:120px minmax(0,1fr);height:auto}.pde-pages,.pde-center{height:clamp(320px,55vh,650px)}.pde-right{grid-column:1/-1;max-height:560px}.pde-layers{max-height:150px;flex:auto}.pde-properties{max-height:280px}.pde-toolbar{gap:5px}.pde-tools button{font-size:.75rem}}@media(max-width:575px){.pde-grid{grid-template-columns:1fr}.pde-center{grid-row:1;height:clamp(300px,52vh,550px)}.pde-pages{grid-row:2;height:auto}.pde-pages .pde-scroll{display:flex;overflow:auto;gap:5px}.pde-page{min-width:85px;width:85px;margin:0}.pde-page img{height:65px}.pde-right{grid-row:3}.pde-stage{padding:9px}.pde-toolbar{padding:5px}.pde-empty{min-height:48vh}}

/* Advanced document actions */
.pde-advanced-body section{padding:12px 0;border-bottom:1px solid var(--pd-line)}.pde-advanced-body section:first-child{padding-top:0}.pde-advanced-body section:last-child{border-bottom:0}.pde-advanced-body h3{font-size:1rem;margin:0 0 6px}.pde-advanced-body p{font-size:.83rem;color:var(--pt-muted);margin-bottom:9px}.pde-search-results{display:grid;gap:6px;max-height:45vh;overflow:auto}.pde .pde-search-results button{white-space:normal;text-align:left;overflow-wrap:anywhere;padding:10px}.pde-search-results small{display:block;color:var(--pt-muted);margin-top:4px}.pde-stage.pde-panning{cursor:grabbing}.pde-surface{flex-shrink:0}.pde-preserve-state{font-size:.7rem;color:var(--pt-muted)}
