*{box-sizing:border-box}body{margin:0;background:#f3f6fa;color:#14263b;font:16px/1.5 system-ui,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #cbd7e3;border-radius:10px;padding:10px 16px;background:white;color:#14263b;font-weight:600}button:hover{background:#e1f0eb}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:#153f57;color:white;border-color:#153f57}.primary:hover{background:#236681}a{color:inherit;text-decoration:none}.banner{background:#dff6ed;padding:8px 20px;text-align:center;font-size:13px;color:#18513f}header{display:flex;align-items:center;gap:12px;padding:18px 5vw;background:white;border-bottom:1px solid #dce4ed}.brand{display:flex;gap:12px;align-items:center;font-size:27px;font-weight:750;margin-right:auto}.brand b{background:#10243a;color:#55dfb2;border-radius:10px;padding:1px 12px}.brand small{font-size:14px;color:#6a7c90;font-weight:400;margin-left:8px}.layout{display:grid;grid-template-columns:220px 1fr;max-width:1450px;margin:auto;min-height:80vh}aside{padding:30px 18px;border-right:1px solid #dce4ed}nav{display:grid;gap:8px}nav a{padding:12px 16px;border-radius:10px;color:#5d6f84;font-weight:600}nav a.active{background:#10243a;color:white}.profile{margin:30px 12px;padding-top:20px;border-top:1px solid #d5dfe9;font-size:14px}.profile strong{display:block}.pill{display:inline-block;font-size:13px;padding:4px 10px;border-radius:30px;background:#e8f3f6;color:#326274;margin:8px 0}.content{padding:34px 40px;min-width:0}.eyebrow{font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:#417e70}h1{font-size:clamp(28px,4vw,40px);letter-spacing:-.04em;line-height:1.15;margin:10px 0 12px}h2{font-size:21px;margin:0 0 10px}p{color:#64768b;margin:0 0 20px}.heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:28px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.card,.panel{background:white;border:1px solid #dce4ed;border-radius:18px;padding:24px;box-shadow:0 6px 25px #14263b05}.card{display:flex;flex-direction:column}.card p{font-size:15px;flex:1}.symbol{width:46px;height:46px;display:grid;place-items:center;border-radius:12px;background:#dff5eb;color:#27614e;font-size:24px;margin-bottom:22px}.card:nth-child(2) .symbol{background:#e6eeff;color:#445f9d}.card:nth-child(3) .symbol{background:#fff1d9;color:#9b6c21}.balance{font-size:38px;font-weight:750;letter-spacing:-.04em}.balance small{font-size:14px;font-weight:400;color:#66788c;letter-spacing:0}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.panel{margin-top:24px}.strip{margin-top:24px;padding:22px 26px;border-radius:18px;background:#10243a;color:white;display:flex;justify-content:space-between;align-items:center;gap:16px}.strip p{color:#b8cbdc;margin:4px 0 0;font-size:14px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:14px 10px;border-bottom:1px solid #e4ebf2}th{color:#64768b;font-weight:500}td strong{display:block}td small{color:#64768b}.positive{color:#157454;font-weight:700}.negative{color:#a04657;font-weight:700}.login{max-width:960px;margin:45px auto;padding:0 20px}.login-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.intro{background:#10243a;color:white;border-radius:22px;padding:36px}.intro h1{font-size:44px}.intro p{color:#b9cddd}.login button{margin:7px 0;text-align:left}.login button small{display:block;color:#62758a;font-weight:400}.login .primary small{color:#bdd8e5}.scope{background:#e1f0f9;border-left:3px solid #3b8dab;padding:14px 18px;border-radius:0 10px 10px 0;margin-bottom:22px;color:#325b72}.editor{display:grid;grid-template-columns:1fr 1fr;gap:24px}label{display:block;font-size:14px;font-weight:600;margin:14px 0}input,select,textarea{display:block;width:100%;padding:10px;margin-top:6px;border:1px solid #c6d3df;border-radius:8px;color:#14263b;background:white}textarea{min-height:190px;resize:vertical}.checks label{display:flex;gap:10px;align-items:center}.checks input{width:20px;height:20px;margin:0}.result{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f9fc;border:1px solid #d6e1eb;border-radius:10px;padding:20px;min-height:190px}.muted{font-size:14px;color:#64768b}.empty{padding:25px;text-align:center;color:#64768b}dialog{border:0;border-radius:18px;width:440px;max-width:calc(100% - 32px);padding:28px}dialog::backdrop{background:#10243a88}#toast{display:none;position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90%;padding:14px 22px;border-radius:12px;background:#10243a;color:white;box-shadow:0 5px 30px #0003;z-index:10}:focus-visible{outline:3px solid #209b82;outline-offset:3px}[hidden]{display:none!important}@media(max-width:1000px){.cards{grid-template-columns:1fr}.content{padding:26px}.editor{grid-template-columns:1fr}}@media(max-width:650px){header{padding:14px 16px}.brand small{display:none}header button{font-size:14px;padding:8px}.layout{display:block}aside{padding:12px 16px;border-right:0;border-bottom:1px solid #dce4ed}nav{display:flex;overflow:auto;gap:4px}nav a{font-size:14px;white-space:nowrap;padding:10px}.profile{display:flex;gap:10px;align-items:center;padding:0;border:0;margin:10px 4px 0}.profile .pill{margin:0}.content{padding:24px 16px}.panel,.card{padding:20px}.strip{flex-direction:column;align-items:flex-start}.login{margin:24px auto}.login-grid{grid-template-columns:1fr}.intro{padding:26px}.intro h1{font-size:34px}}
.editor-tabs{margin-bottom:20px}.pdf-workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:20px;align-items:start}.pdf-tools{margin-top:0}.pdf-tools h2{font-size:18px}.pdf-tools hr{border:0;border-top:1px solid #dce4ed;margin:22px 0}.pdf-tools label:has(#blackPreview){display:flex;gap:10px;align-items:center}.pdf-tools #blackPreview{width:20px;height:20px;margin:0}.pdf-rule{display:grid;grid-template-columns:22px 1fr 32px;gap:8px;margin-bottom:12px}.pdf-rule select{font-size:14px;margin:0}.pdf-rule textarea{min-height:65px;font-size:14px;margin:6px 0 0}.pdf-rule button{padding:3px}.rule-check{margin:8px 0}.rule-check input{width:20px;height:20px;margin:0}.pdf-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px;background:white;border:1px solid #dce4ed;border-radius:14px;margin-bottom:12px;font-size:14px}.pdf-toolbar button{font-size:14px;padding:8px 12px}.inline{display:flex;gap:6px;align-items:center;margin:0}.inline select{width:auto;margin:0;font-size:14px;padding:7px}.pdf-viewer{background:#dce4ec;border:1px solid #c9d6e2;border-radius:14px;min-height:480px;max-height:850px;overflow:auto;padding:16px;position:relative}#pdfEmpty{max-width:400px;margin:80px auto;text-align:center}#pdfEmpty .symbol{margin:0 auto 20px}#pageStage{position:relative;background:white;box-shadow:0 3px 16px #10243a22;touch-action:pan-x pan-y}#pageStage.drawing-mode{touch-action:none;cursor:crosshair}#pageCanvas{display:block}#rectLayer{position:absolute;inset:0;pointer-events:none}.redact-box{position:absolute;border:2px solid #c22b48;background:#f83f6340;pointer-events:none}.redact-box.manual{border-color:#146bba;background:#168eff33}.redact-box.black{background:#000;border-color:#000}.redact-box.drawing{border-style:dashed}.zone-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid #e1e8f0;padding:10px 0;font-size:14px}.zone-row span{flex:1;overflow-wrap:anywhere}.zone-row button{font-size:14px;padding:6px 10px}.zone-row button:last-child{color:#9a3146}#rectList{max-height:350px;overflow:auto}#pdfProgress{font-size:14px;color:#266354;margin-top:10px}.upload{padding:12px;border:1px dashed #7f9caf;background:#f4f9fc;border-radius:10px}.upload input{font-size:14px;padding:0;border:0;background:transparent}@media(min-width:1001px){body:has(.pdf-workspace) .layout{grid-template-columns:170px 1fr;max-width:1700px}body:has(.pdf-workspace) .content{padding:26px}}@media(max-width:1100px){.pdf-workspace{grid-template-columns:1fr}.pdf-tools{display:block}.pdf-main{min-width:0}.pdf-viewer{max-height:75vh}.pdf-tools .muted{margin-bottom:10px}}@media(max-width:650px){.pdf-viewer{min-height:360px;padding:10px}.pdf-toolbar{position:sticky;top:0;z-index:2}.pdf-tools{padding:18px}.zone-row{flex-wrap:wrap}.zone-row span{min-width:90px}}
.precision-wrapper{position:fixed;left:-10000px;top:0;visibility:hidden;pointer-events:none;margin:0;padding:0;border:0}.precision-layer{position:absolute;inset:0;text-align:initial;overflow:clip;line-height:1;text-size-adjust:none;transform-origin:0 0;pointer-events:none}.precision-layer :is(span,br){color:transparent;position:absolute;white-space:pre;transform-origin:0 0}.precision-layer span.markedContent{top:0;height:0}
.ocr-section{margin-top:18px;border:1px solid #d6e4ed;background:#f6fafc;border-radius:10px;padding:12px}.ocr-section summary{cursor:pointer;font-size:14px;font-weight:650}.ocr-section p{margin:10px 0}.ocr-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;font:14px/1.5 system-ui,sans-serif;background:white;padding:12px;border-radius:8px}#cancelOCR{color:#a23446}
/* Shared guided interface: portal, identity, administration and editor. */
header{padding:14px max(16px,4vw)}.brand{font-size:23px}.brand b{background:#155b47;color:#fff}.primary{background:#155b47;border-color:#155b47}.primary:hover{background:#104937}
.guided-layout,.layout{display:block;max-width:1280px;min-height:0}
aside{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;border-right:0;border-bottom:1px solid #dce4ed;background:#fff}
aside nav{display:flex;gap:8px;flex-wrap:wrap}nav a.active{background:#155b47}.profile{margin:0;padding:0;border:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.profile strong{display:inline}
.content{padding:28px 32px}.content>h1,.heading h1{font-size:30px}.cards{gap:16px}.card,.panel{border-radius:12px;box-shadow:none}.card .symbol{margin-bottom:12px}.balance{font-size:30px}
.login{max-width:540px;margin:32px auto}.login-grid{display:block}.login .intro{display:none}.login .card{padding:28px}.login .card>p{flex:none}.login button{min-height:44px}
.guide-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:20px}
.guide-steps button{display:flex;align-items:center;justify-content:center;gap:10px;min-height:50px;font-weight:600}
.guide-steps button span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#e7edf0;flex-shrink:0}
.guide-steps button.active{background:#155b47;color:white;border-color:#155b47}.guide-steps button.active span{background:#ffffff26}
.guide-panel{margin:0 0 18px;padding:24px;max-width:760px;margin-inline:auto}
.guide-panel hr{display:none}.guide-panel .ocr-section{margin-top:0;margin-bottom:20px}.guide-panel #pdfRules{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.guide-panel #pdfRules .pdf-rule{margin:0}.guide-panel label:has(#blackPreview){display:flex;gap:10px;align-items:center}.guide-panel #blackPreview{width:20px;height:20px;margin:0}
.guided-editor .pdf-main{max-width:1050px;margin:auto}.guided-editor .pdf-main>.panel{margin-top:18px}.guided-editor .pdf-viewer{min-height:240px;max-height:720px}
.guide-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px auto;max-width:1050px}.guide-footer span{font-size:14px;color:#526476;text-align:center}
.guide-status{max-width:1050px;margin:12px auto;font-size:14px;color:#155b47}
.section-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.section-tabs button[aria-pressed=true]{background:#155b47;color:white}
#txtEditor .editor{display:block;max-width:850px;margin:auto}#txtEditor .guide-steps{grid-template-columns:1fr 1fr}
body:has(.guided-editor) .layout{display:block;max-width:1400px}body:has(.guided-editor) .content{padding:24px}
@media(max-width:650px){
 header{flex-wrap:wrap;gap:8px}.brand{font-size:21px}aside{display:block;padding:10px 12px}aside nav{overflow:visible}aside nav a{padding:10px;font-size:14px}.profile{margin:8px 4px 0;font-size:13px}
 .content,body:has(.guided-editor) .content{padding:20px 12px}.guide-steps{gap:6px}.guide-steps button{flex-direction:column;gap:4px;padding:8px 4px;font-size:13px;min-height:64px}
 .guide-panel{padding:18px}.guide-panel #pdfRules{grid-template-columns:1fr}.guide-footer{flex-wrap:wrap;gap:10px}.guide-footer span{order:3;width:100%}.guide-footer button:last-child{margin-left:auto}
 .pdf-toolbar{position:static}.pdf-toolbar button,.zone-row button{min-height:44px}.pdf-viewer{min-height:220px}.zone-row{gap:8px}.tablewrap th,.tablewrap td{min-width:110px}
 .login{margin:22px auto;padding:0 12px}.login .card{padding:22px}.heading{flex-wrap:wrap}.strip{padding:18px}.brand small{display:none}
}
[data-admin-view=access] [data-action]:not([data-action=approve]):not([data-action=revoke]),
[data-admin-view=credit] [data-action]:not([data-action=credit]),
[data-admin-view=roles] [data-action=approve],
[data-admin-view=roles] [data-action=revoke],
[data-admin-view=roles] [data-action=credit]{display:none}
#txtEditor .guide-steps{grid-template-columns:repeat(4,minmax(0,1fr))}
#txtEditor{max-width:850px;margin:auto}
.ocr-range{display:grid;grid-template-columns:1fr 1fr;gap:16px}#ocrPreview{display:block;max-width:100%;height:auto;max-height:420px;object-fit:contain;margin:18px auto;border:1px solid #dce4ed;background:white}#ocrResult{min-height:330px;white-space:pre-wrap}#ocrResultInfo{overflow-wrap:anywhere;font-size:14px}.ocr-page .guide-panel{max-width:850px}
@media(max-width:650px){.ocr-range{grid-template-columns:1fr;gap:0}#ocrResult{min-height:270px}}
.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){.cards{grid-template-columns:1fr}}
#heicPreview{display:block;max-width:100%;height:auto;max-height:450px;object-fit:contain;margin:18px auto}#heicProgress{width:100%;height:18px;margin:14px 0}#heicRows td{overflow-wrap:anywhere;max-width:260px}#heicRows button{margin:3px;min-height:44px}

/* Single-page tools */
.single-page-tool>.guide-steps,.single-page-tool>.guide-footer{display:none}
.single-page-tool>.panel{max-width:none;margin:0 0 18px}
.pdf-workspace{display:grid;grid-template-columns:minmax(280px,370px) minmax(0,1fr);gap:20px;align-items:start}
.pdf-tools,.pdf-main{min-width:0}.pdf-main>.panel{margin-top:18px}
@media(max-width:850px){.pdf-workspace{grid-template-columns:1fr}.content{padding:18px 12px}.single-page-tool>.panel{padding:18px}}
