:root{color:#10201e;background:#f6f8f7;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}.app-shell{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:100vh}.document-rail{display:flex;flex-direction:column;gap:18px;min-height:100vh;padding:22px;color:#f8fcfb;background:#132421}.brand-row{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:8px;color:#06332d;background:#8ce8d3;font-weight:800}.brand-row h1{margin:0;font-size:1.1rem;letter-spacing:0}.brand-row p,.document-empty p,.blank-state p,.status-line{margin:0;color:#647670}.brand-row p{color:#a8bbb5;font-size:.88rem}.primary-action,.secondary-action,.icon-button,.filter-row button,.page-tools button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;border:0;border-radius:8px;transition:transform .16s ease,background-color .16s ease,border-color .16s ease}.primary-action{width:100%;color:#fff;background:#0f766e;font-weight:700}.primary-action:hover:not(:disabled),.icon-button:hover:not(:disabled),.secondary-action:hover:not(:disabled),.filter-row button:hover:not(:disabled){transform:translateY(-1px)}.secondary-action{padding:0 14px;color:#16302c;background:#e5eeeb;font-weight:700}.icon-button{width:42px;color:#173631;background:#e7efec}.document-list{display:flex;flex-direction:column;gap:10px;overflow:auto}.document-item{position:relative;display:grid;width:100%;min-height:78px;color:#dfece8;background:#1c302c;border:1px solid #2d4741;border-radius:8px}.document-item.is-active{color:#fff;border-color:#76dac6;background:#23443e}.document-select{display:grid;gap:5px;width:100%;padding:14px 44px 14px 14px;color:inherit;text-align:left;background:transparent;border:0}.document-name{overflow:hidden;font-weight:700;white-space:nowrap;text-overflow:ellipsis}.document-meta{color:#a8bbb5;font-size:.82rem}.delete-document{position:absolute;top:50%;right:10px;display:grid;place-items:center;width:28px;height:28px;padding:0;color:inherit;border:0;border-radius:6px;background:transparent;transform:translateY(-50%)}.delete-document:hover{color:#fff;background:#9f2f2f}.workspace{display:flex;flex-direction:column;min-width:0;min-height:100vh;padding:20px}.workspace-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.title-field{display:flex;align-items:center;gap:10px;min-width:0;width:min(560px,100%);padding:0 12px;border:1px solid #d6e2de;border-radius:8px;background:#fff}.title-field input{min-width:0;width:100%;height:44px;color:#10201e;background:transparent;border:0;outline:0;font-weight:800}.empty-title,.export-actions,.scanner-controls,.editor-actions,.page-tools{display:flex;align-items:center;gap:10px}.empty-title{color:#647670;font-weight:700}.scanner-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:18px;min-height:0}.scanner-panel,.pages-panel,.editor-panel{border:1px solid #d7e2df;border-radius:8px;background:#fff}.scanner-panel{display:grid;grid-template-rows:minmax(320px,1fr) auto auto auto auto;gap:14px;min-height:650px;padding:14px}.camera-stage{position:relative;display:grid;place-items:center;overflow:hidden;min-height:320px;border-radius:8px;background:#091614}.camera-stage video{width:100%;height:100%;max-height:calc(100vh - 230px);object-fit:contain}.camera-placeholder{display:grid;place-items:center;gap:12px;padding:28px;color:#bed0ca;text-align:center}.camera-placeholder p{margin:0}.document-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none}.document-overlay polygon{fill:#8ce8d31f;stroke:#8ce8d3;stroke-width:4;vector-effect:non-scaling-stroke}.scanner-controls{justify-content:space-between}.scanner-controls .primary-action{width:auto;min-width:150px;padding:0 16px}.done-action{min-width:92px}.resolution-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.resolution-row button{min-height:38px;color:#244841;border:0;border-radius:8px;background:#e8f0ed;font-weight:800}.resolution-row button.is-active{color:#fff;background:#0f766e}.quality-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px;padding:0 12px;color:#4b645f;border-radius:8px;background:#eef4f2;font-size:.88rem;font-weight:800}.quality-row.is-good{color:#064139;background:#dff8f1}.quality-row.is-blur,.quality-row.is-dark,.quality-row.is-low-contrast{color:#7b3511;background:#fff1df}.toggle-pill{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 12px;color:#31514b;border:1px solid #d7e2df;border-radius:999px;background:#f8fbfa;font-weight:800}.toggle-pill input{position:absolute;opacity:0;pointer-events:none}.toggle-pill.is-on{color:#064139;border-color:#8ce8d3;background:#dbfbf3}.scan-feedback{display:grid;grid-template-columns:1fr 140px;gap:12px;align-items:center;color:#58736c;font-weight:700}.scan-feedback meter{width:100%}.error-message{margin:0;color:#a53232;font-weight:700}.pages-panel{display:flex;flex-direction:column;min-height:650px;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid #e2ebe8}.panel-heading h2,.editor-header h2{margin:0;font-size:1rem;letter-spacing:0}.panel-heading span{display:grid;place-items:center;min-width:30px;height:30px;color:#06564c;border-radius:999px;background:#dff8f1;font-weight:800}.page-list{display:grid;gap:12px;margin:0;padding:14px;overflow:auto;list-style:none}.page-card{overflow:hidden;border:1px solid #dce6e3;border-radius:8px;background:#f9fbfa}.page-card img{display:block;width:100%;aspect-ratio:3 / 4;object-fit:contain;background:#edf3f1}.page-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;font-weight:800}.page-tools{gap:5px}.page-tools button{width:30px;min-height:30px;color:#21443e;background:#e8f0ed;font-weight:900}.blank-state{display:grid;place-items:center;flex:1;padding:28px;text-align:center}.status-line{min-height:24px;padding-top:14px;font-size:.9rem}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;display:grid;place-items:center;padding:18px;background:#081412b8}.editor-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto;gap:14px;width:min(920px,100%);max-height:calc(100vh - 36px);padding:14px}.editor-header{display:flex;align-items:center;justify-content:space-between}.crop-stage{position:relative;display:grid;place-items:center;min-height:280px;overflow:hidden;border-radius:8px;background:#0b1715;touch-action:none}.crop-stage img{display:block;width:100%;height:100%;max-height:calc(100vh - 245px);object-fit:contain;-webkit-user-select:none;user-select:none}.crop-polygon{position:absolute;pointer-events:none}.crop-polygon polygon{fill:#ffffff14;stroke:#8ce8d3;stroke-width:5;vector-effect:non-scaling-stroke}.crop-handle{position:absolute;width:28px;height:28px;padding:0;border:3px solid #063a33;border-radius:999px;background:#8ce8d3;transform:translate(-50%,-50%);touch-action:none}.filter-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.filter-row button{min-width:0;color:#244841;background:#e8f0ed;font-weight:800}.filter-row button.is-active{color:#fff;background:#0f766e}.adjustment-panel{display:grid;grid-template-columns:auto repeat(3,minmax(120px,1fr));gap:10px;align-items:center}.adjustment-panel label{display:grid;gap:5px;color:#35564f;font-size:.82rem;font-weight:800}.adjustment-panel input{width:100%;accent-color:#0f766e}.editor-actions{justify-content:space-between}.editor-actions .primary-action{width:auto;padding:0 16px}@media(max-width:980px){.app-shell{grid-template-columns:1fr}.document-rail{min-height:auto}.document-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(230px,1fr);overflow-x:auto}.workspace{min-height:auto}.scanner-grid{grid-template-columns:1fr}.scanner-panel,.pages-panel{min-height:auto}.pages-panel{max-height:none}.page-list{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}}@media(max-width:620px){.document-rail,.workspace{padding:14px}.workspace-header{align-items:stretch;flex-direction:column}.export-actions{justify-content:flex-end}.scanner-panel{grid-template-rows:minmax(300px,58vh) auto auto auto auto}.scanner-controls{display:grid;grid-template-columns:1fr auto auto auto}.scanner-controls .primary-action{min-width:0}.done-action{min-width:0;padding:0 10px}.scan-feedback{grid-template-columns:1fr}.filter-row{grid-template-columns:repeat(2,1fr)}.adjustment-panel{grid-template-columns:1fr}.editor-actions{align-items:stretch;flex-direction:column}.editor-actions .primary-action,.secondary-action{width:100%}}
