:root{font-family:Arial,Helvetica,sans-serif;color:#18191c;background:#f3f4f6;font-size:16px;--red:#dd080b}*{box-sizing:border-box}body{margin:0}header{height:98px;display:flex;align-items:center;gap:36px;padding:20px max(32px,calc((100vw - 1280px)/2));background:white;border-bottom:1px solid #e0e2e5}header img{width:154px;height:auto}.headerlabel{border-left:1px solid #ddd;padding-left:32px;color:#73767d;font-size:12px;letter-spacing:2px}header a{margin-left:auto;color:#2b2c30;font-size:14px;text-decoration:none}main{max-width:1280px;margin:auto;padding:42px 32px 20px}.intro{display:grid;grid-template-columns:1fr 1fr;align-items:end;margin-bottom:32px}.eyebrow{grid-column:1/-1;color:var(--red);font-weight:bold;letter-spacing:2px;font-size:12px}h1{font-size:40px;line-height:1.15;letter-spacing:-1.6px;margin:14px 0 0}h1 span{color:#777b83}.intro p{color:#666a72;line-height:1.7;margin:0 0 4px 36px}.workspace{display:grid;grid-template-columns:430px 1fr;gap:24px;align-items:start}.controls{background:white;padding:28px;border:1px solid #e2e4e7;border-radius:12px}.step{display:flex;align-items:center;gap:12px}.step>span{background:#fce8e8;color:var(--red);padding:7px 8px;border-radius:5px;font-size:12px;font-weight:bold}h2{font-size:16px;margin:0}.drop{margin-top:20px;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:12px;border:1.5px dashed #c8cbd1;background:#fafafa;border-radius:8px;min-height:175px;text-align:center;cursor:pointer;padding:20px}.drop:hover,.drop.drag{border-color:var(--red);background:#fff5f5}.drop svg{color:var(--red)}.drop strong{font-size:16px;overflow-wrap:anywhere}.drop span{font-size:13px;color:#70747c}.drop input{position:absolute;width:1px;height:1px;opacity:0}.drop:focus-within{outline:3px solid #ec8585;outline-offset:3px}.second{margin-top:28px}.identity{display:flex;align-items:center;gap:20px;padding:18px 0}.identity img{width:100px}.identity strong{font-size:14px;display:block}.identity span{display:block;font-size:13px;color:#787c83;margin-top:6px}.fields{display:grid;gap:14px}label{font-size:14px;color:#484b52}input{width:100%;display:block;border:1px solid #d7d9de;border-radius:6px;padding:11px 12px;font:inherit;color:#25272b;background:#fff;margin-top:7px}input:focus{outline:2px solid #efaaaa;outline-offset:1px}.preserve{padding:15px;background:#f5f6f8;border-radius:6px;margin:22px 0}.preserve strong{font-size:13px}.preserve p{font-size:13px;line-height:1.6;color:#737780;margin:6px 0 0}button{font:inherit;cursor:pointer;border:0;border-radius:6px}#download{background:var(--red);color:white;width:100%;padding:16px;font-weight:bold;font-size:15px}#download:hover{background:#be0508}button:disabled{opacity:.42;cursor:not-allowed}.status{font-size:14px;line-height:1.5;color:#565b64;margin:14px 0 0}.status.error{color:#ba0808}.local{font-size:12px;line-height:1.5;color:#888c93;margin:14px 0 0}.preview{background:#e9ebee;border:1px solid #dfe2e6;border-radius:12px;overflow:hidden;min-height:720px}.previewbar{height:64px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;background:#f9fafb;border-bottom:1px solid #dfe2e6}.previewbar span{font-size:12px;color:#7b7e85}#empty{display:flex;align-items:center;flex-direction:column;padding:40px 20px}#empty>p{font-size:14px;color:#868a92;text-align:center}.paper{width:300px;height:424px;background:white;box-shadow:0 14px 30px #232b3a12;padding:35px 28px;transform:rotate(-3deg);position:relative}.paper img{width:104px;margin-bottom:27px}.paperlines{height:6px;background:#e8e9ed;margin:12px 0;width:100%}.short{width:65%}.paperbox{border:1px solid #e6e7eb;height:125px;display:grid;place-items:center;font-size:12px;letter-spacing:3px;color:#aaa;margin:22px 0}.paperfooter{position:absolute;bottom:25px;border-top:2px solid var(--red);padding-top:10px;font-size:9px;width:244px;color:#777}.summary{padding:16px 24px;background:white;display:flex;gap:18px;flex-wrap:wrap;color:#6b7079;font-size:13px}.summary strong{color:#222;display:block;font-size:14px;margin-bottom:4px}.pager{display:flex;justify-content:center;align-items:center;gap:18px;margin:16px 0;font-size:14px}.pager button{background:white;border:1px solid #d5d7db;width:34px;height:32px;font-size:24px}.canvaswrap{padding:0 24px 24px}canvas{width:100%;display:block;background:white;box-shadow:0 3px 16px #22222212}footer{display:flex;justify-content:space-between;font-size:12px;color:#8b8e94;padding:24px 0}footer span{font-size:12px}[hidden]{display:none!important}@media(max-width:960px){.workspace{grid-template-columns:360px 1fr}.intro p{margin-left:20px}h1{font-size:32px}.controls{padding:22px}}@media(max-width:760px){header{padding:18px 22px;height:84px}.headerlabel{display:none}header img{width:125px}main{padding:28px 18px}.intro{display:block}.eyebrow{display:block}h1{font-size:34px}.intro p{margin:18px 0 0;font-size:14px}.workspace{grid-template-columns:1fr}.preview{min-height:580px}.controls{padding:24px}.paper{width:265px;height:380px}.paperfooter{width:209px}footer span{display:none}.canvaswrap{padding:0 12px 12px}}@media(prefers-reduced-motion:no-preference){button,.drop{transition:background .18s,border-color .18s}}

.optional{color:#8a8e95;font-size:12px}



#processing{min-height:590px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:40px 24px;text-align:center;background:radial-gradient(ellipse at center,#fff,#f0f1f4)}.scan-document{width:190px;height:265px;background:white;border:1px solid #e0e2e7;box-shadow:0 20px 40px #20263318;border-radius:8px;padding:27px 23px;position:relative;overflow:hidden;animation:document-float 2.8s ease-in-out infinite}.scan-document img{width:95px;margin-bottom:20px}.scan-lines{height:5px;background:#e6e8ed;margin:12px 0;border-radius:3px}.scan-lines.narrow{width:65%}.scan-roof{font-size:68px;color:#bfc3cc;line-height:80px}.scan-beam{position:absolute;left:0;right:0;top:0;height:3px;background:#dd080b;box-shadow:0 -15px 25px 10px #dd080b18;animation:document-scan 2s ease-in-out infinite}#processing strong{font-size:20px;margin-top:32px}#processing p{font-size:14px;color:#767b85;margin:12px 0}.processing-track{width:min(260px,100%);height:5px;background:#dfe2e8;border-radius:10px;overflow:hidden;margin:12px 0 18px}.processing-track span{display:block;height:100%;background:#dd080b;width:0;transition:width .3s ease}.processing-note{font-size:12px;color:#9297a0}.drop.processing{border-color:#dd080b;background:#fff6f6}.drop.processing svg{animation:upload-pulse 1.4s ease-in-out infinite}@keyframes document-scan{0%{transform:translateY(15px)}50%{transform:translateY(245px)}100%{transform:translateY(15px)}}@keyframes document-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(1deg)}}@keyframes upload-pulse{50%{opacity:.45;transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.scan-document,.scan-beam,.drop.processing svg{animation:none}.processing-track span{transition:none}}

/* Keep the working column and the preview usable at every device width. */
.workspace>*{min-width:0}.summary>div{min-width:0;overflow-wrap:anywhere}.previewbar{height:auto;min-height:64px;gap:12px;flex-wrap:wrap;padding-block:16px}.previewbar span{overflow-wrap:anywhere}.drop strong{max-width:100%}canvas{height:auto}.pager button{width:44px;height:44px}.pager{min-height:44px}button,a,input,label.drop{-webkit-tap-highlight-color:transparent}input{font-size:16px;min-height:46px}header a{min-height:44px;display:flex;align-items:center;white-space:nowrap}button:focus-visible,a:focus-visible{outline:3px solid #e67a7c;outline-offset:3px}main{padding-bottom:max(20px,env(safe-area-inset-bottom))}
@media(min-width:761px) and (max-width:1100px){.workspace{grid-template-columns:minmax(0,1fr)}.controls{padding:28px}.fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.preview{min-height:0}.canvaswrap{max-width:760px;margin:auto}.intro p{margin-left:20px}.headerlabel{letter-spacing:1px}.previewbar{padding-inline:24px}}
@media(max-width:760px){header{gap:16px;padding-inline:18px}.workspace{gap:20px}.preview{min-height:0}.previewbar{padding:16px}.summary{padding:16px;gap:14px}.summary>div{flex-basis:100%}.controls{padding:20px}#processing{min-height:440px;padding:32px 18px}.scan-document{width:160px;height:230px;padding:24px 20px}.scan-roof{line-height:60px}.scan-beam{animation-name:document-scan-mobile}.intro p br{display:none}.local,.status{overflow-wrap:anywhere}.paper{width:min(265px,calc(100vw - 90px));aspect-ratio:210/297;height:auto}.paperfooter{width:calc(100% - 56px)}#empty{padding:32px 20px}footer{line-height:1.5}.identity{gap:16px}}
@media(max-width:380px){main{padding-inline:12px}header{padding-inline:14px}header img{width:112px}header a{font-size:12px}h1{font-size:30px}.controls{padding:16px}.drop{padding:16px}.identity img{width:86px}.previewbar h2{font-size:15px}.previewbar span{font-size:11px}}
@keyframes document-scan-mobile{0%,100%{transform:translateY(12px)}50%{transform:translateY(210px)}}

footer{align-items:center;gap:12px;flex-wrap:wrap}footer .footer-brand{display:block}.developer-credit{margin-left:auto;text-decoration:none;color:#8b8e94;font-size:11px;line-height:1.5;padding:12px 0;text-align:right}.developer-credit strong{font-weight:600;color:#70757e}.developer-credit:hover,.developer-credit:hover strong{color:var(--red)}@media(max-width:420px){footer .footer-brand{font-size:10px}.developer-credit{font-size:10px}footer{gap:4px}}

.crop-settings{border:1px solid #e4e6eb;border-radius:8px;padding:16px;margin-top:20px}.crop-settings h2{font-size:14px}.crop-settings p{font-size:12px;line-height:1.6;color:#777d86}.crop-settings label{display:flex;justify-content:space-between;align-items:center;margin-top:16px}.crop-settings output{font-weight:600;color:var(--red)}input[type=range]{accent-color:var(--red);padding:0;border:0;cursor:pointer;min-height:36px;margin-top:0}.source-paper{position:relative;max-width:170px;margin:12px auto 0;border:1px solid #ddd}.source-paper img{width:100%;display:block}.crop-mask{position:absolute;left:0;right:0;background:#dd080b38;pointer-events:none}.crop-mask.top{top:0;border-bottom:2px dashed #dd080b}.crop-mask.bottom{bottom:0;border-top:2px dashed #dd080b}#sourceCropPreview>span{display:block;font-size:11px;color:#7c828c;margin-top:18px}

select{display:block;width:100%;min-height:46px;margin-top:7px;padding:10px;border:1px solid #d7d9de;border-radius:6px;background:white;font:inherit;font-size:16px;color:#25272b}.check-option{display:flex!important;justify-content:flex-start!important;gap:10px;line-height:1.4}.check-option input{width:19px;height:19px;min-height:19px;margin:0;flex-shrink:0;accent-color:var(--red)}#applyCrop,#unlockPdf{width:100%;padding:13px;background:#25272b;color:white;font-size:13px;margin-top:16px;min-height:44px}#qualityPanel{margin:16px;padding:16px;background:#fff8e9;border:1px solid #eadbbf;border-radius:8px;font-size:12px;color:#65502e}#qualityPanel ul{padding-left:18px;line-height:1.6;margin-bottom:0}#passwordPanel{padding:16px;margin-top:16px;border:1px solid #e4e6eb;border-radius:8px}

#loaded.outdated .canvaswrap{opacity:.45}#loaded.outdated::before{content:'Previzualizare neactualizată — aplică reglajele';display:block;padding:14px;background:#fff3d9;color:#71542b;font-size:13px;text-align:center}

.layout-space{border-top:1px solid #e1e4e8;padding-top:18px;margin-top:22px}.layout-space h2{font-size:13px}.layout-space output{color:var(--red);font-weight:600}

/* Form above, generated document below. */
.workspace{grid-template-columns:minmax(0,1fr);gap:32px}.controls{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:28px;padding:32px}.upload-section,.actions-section{grid-column:1/-1}.upload-section .drop{min-height:140px}.settings-section,.identity-section{min-width:0;border:1px solid #e6e8ec;border-radius:12px;padding:24px;background:#fff}.crop-settings{margin-top:0;border:0;padding:0}.identity-section .second{margin-top:0}.actions-section{border-top:1px solid #e6e8ec;padding-top:24px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.actions-section #applyCrop{margin:0;background:#22252c;color:white;font-weight:700;min-height:52px}.actions-section #download{min-height:52px}.actions-section .status,.actions-section .local{grid-column:1/-1;margin:0}.preview{scroll-margin-top:24px;min-height:400px}.canvaswrap{max-width:880px;margin:0 auto;padding:0 24px 28px}.source-paper{max-width:170px;margin-inline:auto}#processing{min-height:480px}.intro{margin-bottom:28px}
@media(max-width:760px){.controls{grid-template-columns:minmax(0,1fr);padding:18px;gap:18px}.settings-section,.identity-section{padding:18px}.actions-section{grid-template-columns:1fr}.previewbar{padding:18px}.canvaswrap{padding:0 10px 16px}#processing{min-height:440px}}

/* The entire result panel becomes a scanning scene while awaiting/generating. */
.preview:has(#processing:not([hidden])){position:relative;background:#edf0f4}
#processing{position:relative;isolation:isolate;overflow:hidden;min-height:620px;background:radial-gradient(ellipse at 50% 40%,#fff 0%,#f4f6f9 48%,#e9edf2 100%)}
#processing::before{content:'';position:absolute;inset:0;z-index:-2;background-image:linear-gradient(#d8dee640 1px,transparent 1px),linear-gradient(90deg,#d8dee640 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(transparent,#000,transparent)}
#processing::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(transparent 0%,transparent 43%,#dd080b0c 49%,#dd080b50 50%,#dd080b0c 51%,transparent 57%);transform:translateY(-70%);animation:panel-scan 3.6s ease-in-out infinite;pointer-events:none}
#processing strong{max-width:90%;line-height:1.35}#processing p{max-width:430px;line-height:1.6}.processing-track{position:relative}
#processing.awaiting .processing-track span{width:40%!important;animation:awaiting-progress 2.2s ease-in-out infinite}
@keyframes panel-scan{0%,100%{transform:translateY(-65%)}50%{transform:translateY(65%)}}
@keyframes awaiting-progress{0%,100%{transform:translateX(-110%)}50%{transform:translateX(260%)}}
@media(max-width:760px){#processing{min-height:520px;padding:36px 20px}}
@media(prefers-reduced-motion:reduce){#processing::after,#processing.awaiting .processing-track span{animation:none}#processing::after{transform:none}}

.crop-settings>.layout-space{border-top:0;margin-top:0;padding-top:0}.original-crop{margin:24px 0;padding:16px;border:1px solid #e1e4e8;border-radius:8px;background:#fafbfc}.original-crop summary{cursor:pointer;font-size:14px;font-weight:600;color:#535966}.original-crop[open] summary{margin-bottom:18px}.original-crop p{font-size:13px;line-height:1.6}

.band-presets{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.band-presets button{min-height:44px;padding:10px 14px;background:#f1f3f6;color:#373c44;border:1px solid #dce0e6;font-size:13px}

#footerNotes{width:100%;resize:vertical;min-height:96px;border:1px solid #d7d9de;border-radius:6px;padding:12px;font:inherit;line-height:1.5;margin-top:8px}.additional-label{display:block;margin-top:20px}#applyTargets{width:100%;padding:12px;margin:12px 0;background:#eceff3;color:#363c45;min-height:44px}

#cropApplyAll{display:block;width:100%;margin-top:22px;padding:13px 18px;border:1px solid #d9dce2;border-radius:10px;background:#eef0f4;color:#292d34;font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;min-height:48px}.crop-exact{justify-content:flex-end!important;gap:12px;font-size:12px;color:#747b85}.crop-exact input{width:94px;min-height:38px;margin:0;padding:8px}.source-paper{max-width:280px;width:100%}
