.cert-workbench[hidden],.cert-paper-item[hidden],.cert-placement-control[hidden]{display:none}
.cert-workbench{margin-top:28px;border-top:1px solid var(--line);padding-top:25px}
.cert-workbench-head,.cert-paper-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.cert-workbench-head h2{font-size:18px;margin:0 0 5px}.cert-workbench-head p{font-size:12px;color:#829186;margin:0}.cert-workbench-head>span,.cert-paper-heading>span{font-size:11px;color:#819087;white-space:nowrap}
.cert-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.75fr);gap:22px;margin-top:20px;align-items:start}
.cert-page-tabs{display:flex;gap:9px;overflow-x:auto;padding-bottom:12px}.cert-page-tabs button{display:flex;align-items:center;gap:7px;flex:none;border:1px solid var(--line);border-radius:5px;background:#fff;padding:5px 10px 5px 5px;color:#52675a;font-size:11px}.cert-page-tabs button.selected{border-color:#16855c;background:#eef8f0;color:#136b45;font-weight:700}.cert-page-tabs img{width:30px;height:35px;object-fit:cover}
.cert-crop-stage{height:390px;background:#e9efea;border:1px solid #dce5dd;border-radius:6px;display:grid;place-items:center;position:relative;overflow:hidden;padding:15px}.cert-crop-stage>img{max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 9px 24px #243c3122}.cert-crop-box{position:absolute;border:2px solid #16855c;box-shadow:0 0 0 999px #13231e4d;cursor:move;touch-action:none}.cert-crop-handle{position:absolute;width:18px;height:18px;border:2px solid #16855c;border-radius:50%;background:#fff;touch-action:none}.cert-crop-handle.nw{left:-10px;top:-10px;cursor:nwse-resize}.cert-crop-handle.ne{right:-10px;top:-10px;cursor:nesw-resize}.cert-crop-handle.sw{left:-10px;bottom:-10px;cursor:nesw-resize}.cert-crop-handle.se{right:-10px;bottom:-10px;cursor:nwse-resize}
.cert-crop-actions{display:flex;gap:8px;margin-top:11px}.cert-crop-actions .outline-btn{min-height:36px}.cert-paper-heading h3{font-size:14px;margin:0 0 12px}.cert-paper-column{min-width:0}.cert-a4-paper{position:relative;width:min(100%,310px);aspect-ratio:210/297;background:#fff;border:1px solid #e0e5df;box-shadow:0 10px 30px #20372d15;margin:0 auto;overflow:hidden}.cert-paper-item{position:absolute;transform:translate(-50%,-50%);border:1px solid #dbe4dc;touch-action:none;cursor:grab;background:#f0f4f0;box-sizing:border-box}.cert-paper-item.selected{outline:2px solid #16855c;outline-offset:2px}.cert-paper-item.dragging{cursor:grabbing}.cert-paper-item img{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}.cert-a4-paper.single-preview{background:#f8faf8}.cert-placement-control{display:flex;align-items:center;gap:8px;margin-top:14px;font-size:11px;color:#536c5b}.cert-placement-control input{flex:1;min-width:0;accent-color:#16855c}.cert-placement-control span{width:28px;text-align:right}
@media(max-width:760px){.cert-editor-layout{grid-template-columns:1fr;gap:25px}.cert-crop-stage{height:320px}.cert-a4-paper{width:min(100%,290px)}.cert-workbench{margin-top:24px}.cert-workbench-head h2{font-size:16px}}
.scan-preview-toggle{width:100%;justify-content:center;margin-top:9px;min-height:37px}.edit-actions button.selected{border-color:#16855c;background:#eaf6ed;color:#146f48}.scan-crop-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.scan-crop-overlay[hidden]{display:none}.scan-crop-polygon{fill:#16855c18;stroke:#16855c;stroke-width:2;pointer-events:none}.scan-crop-handle{fill:#fff;stroke:#16855c;stroke-width:3;pointer-events:auto;touch-action:none;cursor:move}.scan-stage>.scan-processed-image{max-width:100%;max-height:460px;object-fit:contain;box-shadow:0 12px 35px #33463d24}.scan-stage>.scan-processed-image[hidden]{display:none}.mode-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}.cert-workbench{padding-bottom:55px}
.flow-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.flow-link{width:100%;min-width:0;min-height:78px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:13px 17px;display:flex;align-items:center;gap:13px;text-align:left;color:#33473b}
.flow-link:hover,.cert-card:hover{border-color:#9fc8ab;background:#fbfefb}
.flow-link>span:nth-child(2){display:grid;gap:4px;flex:1;min-width:0}.flow-link strong{font-size:13px}.flow-link small{font-size:11px;color:#91a095;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flow-link>svg{color:#8a9f90}
.flow-icon{height:42px;width:42px;border-radius:6px;display:grid;place-items:center;flex:none}.flow-icon.green{background:#edf6e9;color:#338255}.flow-icon.blue{background:#eaf2f7;color:#4a8aa5}
.scan-layout{display:grid;grid-template-columns:minmax(0,1fr) 316px;gap:20px;margin-top:25px;align-items:start}.scan-main{min-width:0}.scan-stage{min-height:440px;border:1px solid #dce5dd;border-radius:7px;background:#e9efea;display:grid;place-items:center;position:relative;overflow:hidden;padding:30px}.scan-stage>img{max-width:100%;max-height:460px;object-fit:contain;box-shadow:0 12px 35px #33463d24;transition:filter .2s,transform .2s}.scan-stage>img[hidden],.stage-counter[hidden]{display:none}.scan-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px;color:#2c4636}.scan-empty strong{font-size:15px}.scan-empty small{font-size:11px;color:#84958a}.scan-empty .primary{margin-top:10px;background:#16855c;color:#fff}.empty-icon{width:58px;height:58px;background:#f6fbf5;color:#388b60;border:1px solid #d8e9d8;border-radius:12px;display:grid;place-items:center;margin-bottom:5px}.stage-counter{position:absolute;left:15px;top:15px;background:#fffdf7;padding:6px 9px;border-radius:4px;color:#526558;font-size:11px;font-weight:700}.page-strip{display:flex;gap:10px;overflow-x:auto;margin-top:12px;min-height:85px;padding-bottom:4px}.page-item{position:relative;width:64px;height:76px;flex:none;border:2px solid transparent;border-radius:5px;background:#fff;padding:3px;overflow:hidden}.page-item.selected{border-color:#16855c}.page-item img{width:100%;height:100%;object-fit:cover;border-radius:2px}.page-item span{position:absolute;bottom:2px;left:3px;background:#fff;border-radius:2px;padding:2px 4px;font-size:10px;color:#294334}.page-add{width:64px;height:76px;border:1px dashed #b7cbb9;border-radius:5px;background:#f9fbf8;display:grid;place-items:center;color:#4d805e;flex:none}.scan-options,.cert-detail{border:1px solid var(--line);background:#fff;border-radius:7px;padding:21px}.options-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.options-title h2{font-size:16px;margin:0}.options-title span{font-size:11px;color:#8c9a90}.control-group{margin-bottom:23px}.control-group .field-label{margin-bottom:10px}.mode-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.mode-tabs button{border:1px solid var(--line);background:#fff;border-radius:5px;min-width:0;height:35px;color:#67776c;font-size:11px}.mode-tabs button.selected,.export-choices button.selected{border-color:#59a879;background:#ecf8ed;color:#146f48;font-weight:700}.edit-actions,.export-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.edit-actions button,.export-choices button{border:1px solid var(--line);background:#fff;border-radius:5px;min-width:0;min-height:49px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font-size:11px;color:#52675a}.edit-actions button:hover,.export-choices button:hover{border-color:#9cc6a8}.control-group select{width:100%;height:37px;border:1px solid var(--line);border-radius:5px;background:#fff;padding:0 10px;color:#3f5545;font-size:12px}.full-action{width:100%;justify-content:center;background:#16855c!important;color:#fff!important}.full-action:hover{background:#0f6e48!important}.scan-options .hint{margin:11px 0 0}.cert-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px;margin-top:20px;align-items:start}.cert-title{margin-top:0}.muted-note{font-size:11px;color:#96a399}.cert-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.cert-card{min-height:126px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:16px 12px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;color:#26382c;min-width:0}.cert-card.selected{border:1.5px solid #16855c;background:#f3fbf4}.cert-card .cert-symbol{width:36px;height:36px;border-radius:7px;background:#edf5ed;color:#4c9367;display:grid;place-items:center;margin-bottom:auto}.cert-card strong{font-size:12px;margin-top:16px}.cert-card small{font-size:10px;color:#8e9c91;margin-top:3px}.cert-detail{position:sticky;top:94px}.detail-tag{font-size:10px;font-weight:700;color:#16855c;letter-spacing:.06em}.detail-symbol{width:62px;height:62px;border-radius:10px;background:#e9f4ed;color:#258257;display:grid;place-items:center;margin:22px 0 16px}.cert-detail h2{font-size:20px;margin:0 0 7px}.cert-detail p{font-size:12px;color:#788b7d;line-height:1.6;min-height:38px;margin:0}.detail-divider{border-top:1px solid var(--line);margin:20px 0}.detail-meta{display:flex;justify-content:space-between;gap:15px;font-size:11px;margin-bottom:11px}.detail-meta span{color:#90a094}.detail-meta strong{color:#355443;font-weight:600;text-align:right}.cert-steps{display:flex;align-items:center;gap:4px;flex-wrap:wrap;background:#f4f8f4;border-radius:5px;padding:12px 9px;margin:19px 0;font-size:10px;color:#607767}.cert-steps span{white-space:nowrap}.cert-steps svg{color:#9ab6a0}.cert-captured{margin:0 0 13px;font-size:11px;color:#2b7750}.cert-captured[hidden]{display:none}
.scan-empty[hidden],#certExport[hidden]{display:none}.cert-captured{overflow-wrap:anywhere}
@media(max-width:1050px){.scan-layout{grid-template-columns:minmax(0,1fr) 270px}.cert-layout{grid-template-columns:minmax(0,1fr) 265px}.cert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.flow-grid{grid-template-columns:1fr;gap:9px}.flow-link{min-height:69px}.scan-layout,.cert-layout{grid-template-columns:1fr;gap:13px}.scan-stage{min-height:340px;padding:18px}.scan-stage>img{max-height:330px}.scan-options{padding:19px}.cert-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cert-card{min-height:110px;padding:12px}.cert-detail{position:static}.cert-title{margin-top:9px}.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}.bottom-nav button{font-size:9px;padding:5px 1px}.bottom-nav button svg{width:18px;height:18px}}
@media(max-width:350px){.cert-steps{gap:2px}.flow-link small{font-size:10px}.mode-tabs button{font-size:10px}}
.photo-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.photo-actions button{min-width:0;min-height:42px;justify-content:center;padding:9px 5px;white-space:nowrap}.photo-actions .primary{background:#16855c;color:#fff}.photo-actions .outline-btn{margin-top:0}.scan-camera{margin-top:8px}.cert-gallery{width:100%;justify-content:center;margin-top:8px}
.file-actions{display:flex;align-items:center;justify-content:flex-end;gap:2px}.doc-row,.recent-head{grid-template-columns:minmax(0,1fr) 110px 90px 72px}.doc-row .row-menu{width:31px;height:31px;display:grid;place-items:center}.modal .field select,.modal .field input{width:100%;min-height:40px;border:1px solid var(--line);border-radius:5px;padding:8px 10px;background:#fff}.swatch:disabled{opacity:.35;cursor:not-allowed}
.photo-crop-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.photo-crop-canvas:active{cursor:grabbing}
.photo-zoom{display:flex;align-items:center;gap:10px;margin:0 0 20px}.photo-zoom label{font-size:11px;color:#52675a;white-space:nowrap}.photo-zoom input{flex:1;min-width:0;accent-color:#16855c}.photo-zoom button{border:1px solid var(--line);background:#fff;border-radius:5px;color:#22573d;width:30px;height:30px;display:grid;place-items:center;padding:0}
#page-photo .canvas-panel{background:#edf1ed;min-height:510px}
#page-photo .sample-photo.has-image{height:390px;width:auto;max-width:90%;outline:1px solid #fff;outline-offset:5px;box-shadow:0 15px 34px #203b3426}
#page-photo .canvas-label{background:#fff;color:#4d6656;font-weight:600}
#page-photo .settings{padding:24px}
#page-photo .settings .field{margin-bottom:21px}
#page-photo .settings h2{margin-bottom:23px}
#page-photo .photo-actions{margin-top:5px}
#page-photo .canvas-panel .drop-copy{max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.doc-row,.recent-head{grid-template-columns:minmax(0,1fr) 66px 52px 70px;gap:5px}.doc-date,.doc-size{font-size:10px}.doc-row{padding:10px 7px}.doc-main{gap:6px}.doc-thumb{width:27px;height:36px}.doc-name{font-size:11px}.doc-sub{font-size:10px}}
@media(max-width:760px){
  #page-photo{padding-bottom:160px}
  #page-photo .workspace{gap:0;margin-top:17px}
  #page-photo .canvas-panel{height:365px;min-height:365px;border-radius:6px}
  #page-photo .canvas-label{display:none}
  #page-photo .sample-photo{transform:scale(.85)}
  #page-photo .canvas-panel .drop-copy{display:none}
  #page-photo .settings{border:0;background:transparent;border-radius:0;padding:18px 0 0}
  #page-photo .settings h2{font-size:15px;margin-bottom:16px}
  #page-photo .settings .field{margin-bottom:19px}
  #page-photo .segment button{min-height:43px;font-size:12px}
  #page-photo .swatches{gap:14px}
  #page-photo .swatch{width:36px;height:36px}
  #page-photo .settings .hint{margin-top:10px}
  #page-photo .photo-actions{position:fixed;left:0;right:0;bottom:calc(58px + env(safe-area-inset-bottom));z-index:19;background:#fff;border-top:1px solid var(--line);padding:8px 16px;grid-template-columns:repeat(3,minmax(0,1fr));box-shadow:0 -5px 18px #102b1710}
  #page-photo .photo-actions button{min-height:42px;font-size:11px}
  .scan-empty .scan-camera{margin-top:10px}
}
.confirm-dialog{width:min(390px,100%);padding:25px}
.confirm-symbol{width:42px;height:42px;display:grid;place-items:center;border-radius:7px;background:#fff0ec;color:#bc4d3b;margin-bottom:17px}
.confirm-dialog h2{font-size:18px;margin:0}
.confirm-dialog p{font-size:13px;color:#64736a;line-height:1.7;margin:11px 0 24px;overflow-wrap:anywhere}
.confirm-actions{display:flex;justify-content:flex-end;gap:9px}
.confirm-actions button{min-width:86px;min-height:39px;padding:0 15px;border-radius:6px;font-size:12px;font-weight:700;cursor:pointer}
#confirmCancel{background:#fff;border:1px solid #dce5de;color:#52665a}
#confirmAccept{background:#b94435;border:1px solid #b94435;color:#fff}
#confirmAccept:hover{background:#9e3428}
.confirm-actions button:focus-visible{outline:2px solid #16855c;outline-offset:2px}
.row-menu:disabled{opacity:.4;cursor:wait}
@media(max-width:480px){.confirm-dialog{padding:21px}.confirm-actions{display:grid;grid-template-columns:1fr 1fr}.confirm-actions button{min-height:43px}}
.cert-layout-controls[hidden],.cert-reorder[hidden]{display:none}
.cert-layout-controls{display:grid;gap:9px;margin:0 0 13px}
.cert-layout-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.cert-layout-modes button,.cert-preview-pages button{min-height:34px;border:1px solid #d7e3da;border-radius:5px;background:#fff;color:#516a59;font-size:11px;cursor:pointer}
.cert-layout-modes button.selected,.cert-preview-pages button.selected{border-color:#16855c;background:#ebf7ee;color:#126a43;font-weight:700}
.cert-preview-pages{display:flex;gap:5px;overflow-x:auto}
.cert-preview-pages button{width:32px;flex:none}
.cert-reorder{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.cert-reorder .outline-btn{min-height:35px;padding:6px 9px;font-size:11px}
.cert-reorder .outline-btn[hidden]{display:none}
.cert-reorder .outline-btn:disabled{opacity:.45;cursor:default}
.upload-workflows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.upload-workflows button{min-width:0;min-height:68px;padding:11px;display:flex;align-items:center;gap:10px;text-align:left;background:#fff;border:1px solid var(--line);border-radius:6px;color:#31503c;cursor:pointer}
.upload-workflows button:hover,.upload-workflows button:focus-visible{border-color:#16855c;background:#f2faf3;outline:none}
.upload-workflows button>svg{flex:none;color:#16855c}
.upload-workflows button span{display:grid;gap:3px;min-width:0}
.upload-workflows button strong{font-size:12px}
.upload-workflows button small{font-size:10px;color:#829186;line-height:1.3}
.upload-archive{width:100%;margin-top:10px}
.upload-archive-note{font-size:11px;color:#819087;line-height:1.5;margin-top:7px}
.scan-options .edit-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
.scan-options .edit-actions button{padding:6px 2px;line-height:1.2;overflow-wrap:anywhere}
.flow-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:760px){.flow-grid{grid-template-columns:1fr}}
@media(max-width:480px){.cert-reorder .outline-btn{flex:1 1 calc(33.33% - 7px);padding:5px 2px;font-size:10px}.upload-workflows{grid-template-columns:1fr}}
@media(max-width:760px){.top-actions .icon-btn{display:grid;flex:none}.topbar .crumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-actions{flex:none}}

/* Shared document workbench */
.scan-layout{grid-template-columns:104px minmax(0,1fr) 292px;gap:0;border:1px solid #dce5dd;border-radius:8px;overflow:hidden;background:#fff;min-height:620px}
.scan-page-rail{min-width:0;border-right:1px solid #e2e9e3;background:#fbfdfb;padding:15px 10px}
.scan-rail-head{display:flex;justify-content:space-between;align-items:center;color:#607466;font-size:11px;margin-bottom:12px;padding:0 3px}
.scan-rail-head strong{color:#2d4836;font-size:12px}
.scan-page-rail .page-strip{display:flex;flex-direction:column;align-items:center;gap:12px;overflow-y:auto;overflow-x:hidden;margin:0;max-height:720px;padding:0 2px 10px}
.scan-page-rail .page-item,.scan-page-rail .page-add{width:74px;height:92px}
.scan-page-rail .page-item img{object-fit:contain;background:#edf2ed}
.scan-main{display:flex;min-width:0;background:#e9efea}
.scan-stage{border:0;border-radius:0;min-height:620px;width:100%;padding:28px}
.scan-stage>img,.scan-stage>.scan-processed-image{max-height:560px}
.scan-options{border:0;border-left:1px solid #dce5dd;border-radius:0;padding:20px 17px;max-height:calc(100vh - 160px);min-height:620px;overflow-y:auto}
.scan-options .options-title{margin-bottom:21px}
.scan-options .control-group{margin-bottom:20px}
.scan-options .mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.scan-options .mode-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:70px;height:auto;padding:8px 3px;line-height:1.25;font-size:11px;cursor:pointer}
.scan-options .mode-tabs button svg{flex:none;color:#557f61}
.scan-options .mode-tabs button.selected{border-color:#16855c;background:#ddf5e8;box-shadow:inset 0 0 0 1px #16855c}
.scan-options .mode-tabs button.selected svg{color:#16855c}
.scan-apply-all{display:flex;align-items:center;gap:7px;margin-top:12px;color:#576b5d;font-size:11px;cursor:pointer}
.scan-apply-all input{accent-color:#16855c;width:15px;height:15px;margin:0}
.scan-paper-note{margin:8px 0 0;color:#738579;font-size:11px;line-height:1.5}
.scan-paper-note[hidden]{display:none}
.print-preview-modal{width:min(560px,100%);max-height:95vh;overflow:auto}.print-preview-paper{width:min(100%,360px);margin:18px auto 0;background:#fff;border:1px solid #dce5dd;box-shadow:0 12px 30px #20372d20;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.print-preview-paper.sized{aspect-ratio:210/297}.print-preview-paper img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}.print-preview-modal p{text-align:center}
.cert-open-preview{width:100%;justify-content:center;margin-top:12px}.cert-preview-modal{width:min(540px,100%);max-height:95vh;overflow:auto}.cert-preview-large{padding:18px 0 2px}.cert-preview-large .cert-a4-paper{width:min(100%,430px)}
.cert-gallery-hint{margin:8px 0 0;color:#738579;font-size:11px;line-height:1.5}.cert-gallery:disabled,.cert-detail button:disabled{opacity:.55;cursor:not-allowed}
.cert-preview-large .cert-a4-paper{max-height:68vh}.cert-preview-nav{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:16px;font-size:12px;color:#536c5b}.cert-preview-nav[hidden]{display:none}.cert-preview-nav button{width:34px;height:34px;display:grid;place-items:center;border:1px solid #d7e3da;border-radius:5px;background:#fff;color:#267850}.cert-preview-nav button:disabled{opacity:.4}
.cert-preview-large{text-align:center;min-height:60px;color:#738579;font-size:12px}.cert-preview-large>img{display:block;max-width:100%;max-height:68vh;width:auto;height:auto;margin:auto;box-shadow:0 10px 25px #20372d1c}
.cert-crop-stage{height:auto;min-height:390px;display:flex;align-items:center;justify-content:center}.cert-crop-stage>img{display:block;width:auto;height:auto;max-width:100%;max-height:min(72vh,900px)}
@media(max-width:760px){.cert-crop-stage{height:auto;min-height:320px}.cert-crop-stage>img{max-height:65vh}}
.cert-paper-item img[hidden]{display:none}.cert-paper-item.loading{display:grid;place-items:center;background:#eef3ef}.cert-paper-item.loading:after{content:'正在生成裁剪预览…';font-size:11px;color:#6f8174;text-align:center;padding:8px}
.cert-paper-item.preview-error:after{content:'预览失败，请调整裁剪角点';color:#a34338}
.cert-merge-control{display:flex;align-items:center;gap:8px;margin:3px 0 12px;font-size:12px;font-weight:600;color:#315b42;cursor:pointer}.cert-merge-control[hidden]{display:none}.cert-merge-control input{width:16px;height:16px;accent-color:#16855c}
.doc-row,.recent-head{grid-template-columns:minmax(0,1fr) 110px 90px 104px}.file-thumb{padding:0;display:grid;place-items:center;overflow:hidden;color:#6e8d78;cursor:pointer}.file-thumb.loaded{background:#fff}.file-thumb img{display:block;width:100%;height:100%;object-fit:contain}.file-actions{gap:2px}.file-preview-modal{width:min(840px,100%);max-height:96vh;overflow:auto}.file-preview-modal .modal-head h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:12px}.file-preview-content{min-height:180px;max-height:76vh;overflow:auto;display:grid;place-items:center;margin:16px 0;background:#f2f5f2;color:#67796c;font-size:12px}.file-preview-content img{display:block;max-width:100%;max-height:75vh;object-fit:contain}.file-preview-content iframe{display:block;width:100%;height:72vh;border:0;background:#fff}.file-preview-content pre{width:100%;max-height:72vh;overflow:auto;margin:0;padding:18px;white-space:pre-wrap;word-break:break-word;color:#243b2d;text-align:left}.file-preview-download{width:100%;justify-content:center}
@media(max-width:600px){.doc-row,.recent-head{grid-template-columns:minmax(0,1fr) 104px;gap:6px}.doc-date,.doc-size,.recent-head>span:nth-child(2),.recent-head>span:nth-child(3){display:none}.doc-row{padding:10px 8px}.doc-name{font-size:11px}.file-preview-modal{padding:16px}.file-preview-content{max-height:68vh}.file-preview-content iframe{height:62vh}}
.cert-crop-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.file-preview-actions{display:flex;gap:8px}.file-preview-actions .outline-btn{flex:1;justify-content:center}.file-preview-actions .outline-btn[hidden]{display:none}
.cert-crop-overlay[hidden]{display:none}
.cert-crop-polygon{fill:#16855c20;stroke:#16855c;stroke-width:2;pointer-events:none}
.cert-crop-overlay .cert-crop-handle{position:static;width:auto;height:auto;border:0;background:transparent;fill:#fff;stroke:#16855c;stroke-width:3;pointer-events:auto;touch-action:none;cursor:move}
@media(max-width:1150px){.scan-layout{grid-template-columns:88px minmax(0,1fr) 260px}.scan-page-rail .page-item,.scan-page-rail .page-add{width:64px;height:82px}.scan-stage{padding:18px}}
@media(max-width:850px){.scan-layout{display:flex;flex-direction:column;align-items:stretch;min-height:0}.scan-main{order:1}.scan-stage{min-height:390px}.scan-stage>img,.scan-stage>.scan-processed-image{max-height:370px}.scan-page-rail{order:2;border-right:0;border-top:1px solid #e2e9e3;padding:10px 13px}.scan-rail-head{margin-bottom:8px}.scan-page-rail .page-strip{flex-direction:row;overflow-x:auto;overflow-y:hidden;max-height:none;min-height:82px;align-items:flex-start}.scan-page-rail .page-item,.scan-page-rail .page-add{width:62px;height:72px}.scan-options{order:3;min-height:0;max-height:none;border-left:0;border-top:1px solid #dce5dd;overflow:visible}.scan-options .mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:480px){.scan-stage{min-height:320px;padding:12px}.scan-stage>img,.scan-stage>.scan-processed-image{max-height:310px}.scan-options{padding:17px 12px}.scan-options .mode-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.scan-options .mode-tabs button{font-size:10px;min-height:66px}.scan-options .mode-tabs button svg{width:18px;height:18px}.scan-options .edit-actions button{font-size:10px}}
