:root{font-family:Inter,Arial,sans-serif;color:#20373b;background:#edf2f3;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,.button{cursor:pointer;border:1px solid #c6d3d5;border-radius:7px;background:white;padding:11px 16px;font-size:14px;font-weight:600;color:#24464b}button:hover,.button:hover{background:#e7f2f1}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.upload:focus-within{outline:3px solid #38b6a6;outline-offset:2px}.top{background:#fff;border-bottom:1px solid #d9e3e4;display:flex;justify-content:space-between;align-items:center;padding:20px 4vw;gap:20px}.brand{display:flex;align-items:center;gap:12px;font-size:21px}.brand b{font-weight:400}.brandmark{background:#174b50;color:#fff;border-radius:9px;padding:9px 12px;font-size:25px;font-weight:bold}.brand small{display:block;font-size:12px;letter-spacing:1.5px;text-transform:uppercase;color:#6a8185;margin-top:5px}.actions{display:flex;align-items:center;gap:20px}.language{display:flex;gap:10px;align-items:center;font-size:14px}.language select{width:120px}.primary{background:#176f68;color:#fff;border-color:#176f68}.primary:hover{background:#125b55}main{display:grid;grid-template-columns:minmax(360px,470px) minmax(0,1fr);max-width:1480px;margin:auto;gap:44px;padding:35px 4vw 60px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.eyebrow{font-size:12px;letter-spacing:1.7px;text-transform:uppercase;color:#58787d}h1{font-size:27px;letter-spacing:-.7px;margin:7px 0 0}.badge{background:#dbece8;color:#30675d;border-radius:30px;padding:7px 13px;font-size:12px}.card{padding:22px;background:#fff;border:1px solid #dde5e6;border-radius:10px;margin-bottom:16px}h2{font-size:16px;display:flex;gap:12px;align-items:center;margin:0 0 21px}h2>span:first-child{font-size:12px;color:#618b8c;background:#edf5f4;padding:5px;border-radius:4px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.field{display:flex;flex-direction:column;gap:7px;font-size:14px;margin-bottom:0;min-width:0}.field.full{grid-column:1/-1}input,textarea,select{width:100%;border:1px solid #ccd9dc;background:#fff;color:#20373b;border-radius:6px;padding:10px;font-size:14px;min-width:0}textarea{resize:vertical;min-height:75px}.logo-row{display:flex;justify-content:space-between;align-items:center;gap:10px}.upload{border:1px dashed #9bbebc;border-radius:7px;background:#f5faf9;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer;padding:14px;font-size:14px;position:relative;overflow:hidden}.upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload img{max-width:85px;max-height:45px}.text-button{border:0;font-size:12px;padding:8px}.hint{font-size:12px;color:#687f84;line-height:1.6}.add{width:100%;border-style:dashed;margin-top:13px;color:#176f68}.item{padding:14px 0;border-top:1px solid #e2e9ea}.item:first-child{border-top:0;padding-top:0}.item-top{display:flex;gap:8px;margin-bottom:12px}.item-top .field{flex:1}.delete{align-self:end;padding:9px 12px;color:#92524b}.item-grid{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:10px}.totals-fields{border-top:1px solid #e2e9ea;padding-top:20px;margin-top:22px}.bottom-actions{display:flex;gap:12px}.preview{min-width:0}.preview-head{display:flex;justify-content:space-between;text-transform:uppercase;letter-spacing:1.8px;font-size:12px;color:#6a8085;margin:12px 0 22px}#paper{background:white;box-shadow:0 9px 35px #213d4510;min-height:940px;padding:46px 40px;border-top:6px solid #1d655f;font-size:14px;color:#293d42;overflow-wrap:anywhere}.doc-top{display:flex;justify-content:space-between;gap:25px;min-height:100px}.doc-logo{max-width:160px;max-height:78px;object-fit:contain;object-position:left}.doc-company{font-size:24px;color:#1b5955;font-weight:700;margin:0}.doc-title{text-align:right;font-size:27px;font-weight:500;line-height:1.15;margin:0;color:#174d4b}.doc-num{text-align:right;font-size:14px;color:#6b8387;margin-top:12px}.rule{height:1px;background:#dfe8e8;margin:27px 0}.parties{display:grid;grid-template-columns:1fr 1fr;gap:30px}.doc-label{text-transform:uppercase;letter-spacing:1.5px;color:#6a8488;font-size:11px;margin:0 0 12px}.pre{white-space:pre-wrap;line-height:1.65}.party-name{font-size:16px;font-weight:600;margin-bottom:6px}.muted{color:#809194}.date-strip{display:flex;gap:35px;background:#f1f7f6;padding:16px;margin:28px 0}.date-strip .doc-label{margin-bottom:7px}table{border-collapse:collapse;width:100%;font-size:12px}th{color:#557478;text-align:right;font-weight:500;padding:12px 4px;border-bottom:1px solid #9fbcb9}th:first-child,td:first-child{text-align:left}td{text-align:right;vertical-align:top;padding:16px 4px;border-bottom:1px solid #e3ebeb}td:first-child{width:45%;white-space:pre-wrap}.summary{width:58%;margin:23px 0 32px auto}.sumrow{display:flex;justify-content:space-between;gap:15px;padding:9px 0;font-size:13px}.sumrow.grand{border-top:1px solid #b5ccca;margin-top:10px;padding-top:16px;font-size:20px;color:#1a605a;font-weight:600}.doc-notes{margin-top:28px;font-size:12px}.doc-footer{font-size:11px;color:#839295;border-top:1px solid #dfe8e8;padding-top:20px;margin-top:40px;line-height:1.5}.preview-tip{text-align:center;font-size:12px;color:#768b8e;padding:12px}#status{font-size:14px;color:#176f68}#notesFields .field+.field{margin-top:16px}@media(min-width:1200px){.preview{position:sticky;top:25px;align-self:start}}@media(max-width:1050px){main{gap:25px;padding:25px 3vw;grid-template-columns:minmax(320px,400px) minmax(0,1fr)}#paper{padding:30px 22px}.doc-title{font-size:23px}.summary{width:85%}}@media(max-width:800px){main{grid-template-columns:1fr;max-width:650px}.top{padding:15px 4vw;flex-wrap:wrap}.actions{width:100%;justify-content:space-between}.brand{font-size:19px}#paper{min-height:800px}.preview{margin-top:15px}}@media print{@page{size:A4;margin:15mm}body{background:#fff}.top,.editor,.preview-head,.preview-tip{display:none!important}main{display:block;padding:0;max-width:none;margin:0}.preview{position:static}#paper{box-shadow:none;min-height:0;border-top:5px solid #1d655f;padding:25px 0;font-size:12px;print-color-adjust:exact;-webkit-print-color-adjust:exact}.doc-top,.parties,.date-strip,.summary,.doc-notes,.doc-footer,tr{break-inside:avoid}thead{display:table-header-group}.summary{width:50%}.doc-footer{margin-top:25px}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.doc-num{display:flex;align-items:center;justify-content:flex-end;gap:4px;position:relative;margin-top:10px}.doc-num-input{width:min(100%,180px);padding:6px 4px;border:1px solid transparent;border-radius:4px;text-align:right;color:#577478;font-size:14px;background:transparent}.doc-num-input:hover,.doc-num-input:focus{border-color:#9bbebc;background:#f5faf9}.edit-symbol{color:#6e9895;font-size:13px;pointer-events:none}@media print{.doc-num-input{border:0!important;background:transparent!important;padding:0;color:#6b8387}.edit-symbol{display:none}}

.product-image-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 14px}.product-upload{min-width:155px;justify-content:flex-start}.product-upload img{max-height:44px;max-width:62px;object-fit:contain}.image-position{flex:1 1 170px}.image-position select{max-width:100%}.product-table{table-layout:fixed;border:1px solid #75c9c4}.product-table th{background:#168780;color:#fff;border-bottom:2px solid #0f706a;font-weight:600;padding:12px 5px}.product-table th:first-child,.product-table td:first-child{width:43%}.product-table th:nth-child(2),.product-table td:nth-child(2){width:11%}.product-table th:nth-child(3),.product-table td:nth-child(3){width:18%}.product-table th:nth-child(4),.product-table td:nth-child(4){width:10%}.product-table th:nth-child(5),.product-table td:nth-child(5){width:18%}.product-table td{border-bottom:1px solid #75c9c4;overflow-wrap:anywhere}.product-table td:first-child{white-space:normal}.product-with-thumb{display:flex;align-items:flex-start;gap:9px;text-align:left}.product-with-thumb img{width:52px;height:52px;object-fit:contain;flex:none}.product-main img{display:block;max-width:100%;width:150px;height:105px;object-fit:contain;object-position:left center;margin:0 0 7px}.product-description{white-space:pre-wrap}.summary .sumrow.grand{border-color:#75c9c4}@media(max-width:1050px){.product-with-thumb{gap:5px}.product-with-thumb img{width:38px;height:38px}.product-main img{width:120px;height:85px}.product-table{font-size:11px}.product-table td,.product-table th{padding-left:3px;padding-right:3px}}@media print{.product-table{border-color:#168780;print-color-adjust:exact;-webkit-print-color-adjust:exact}.product-table th{background:#168780!important;color:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.product-table td{border-bottom-color:#75c9c4}.product-with-thumb img{width:52px;height:52px}.product-main img{width:150px;height:105px}}

@media(max-width:550px){.actions{gap:7px;flex-wrap:wrap}.actions button{flex:1 1 auto;padding:10px 8px}.language{width:100%;justify-content:space-between}}

.document-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px;background:#dce9e9;border-radius:10px;margin-bottom:24px}.document-tabs button{border:0;background:transparent;color:#47696c;padding:13px 10px;border-radius:7px;font-size:15px;line-height:1.3}.document-tabs button[aria-selected=true]{background:#fff;color:#155e59;box-shadow:0 1px 6px #1c4a4a20}.signatures{display:grid;grid-template-columns:1fr 1fr;gap:28px;border-top:1px solid #75c9c4;padding-top:25px;margin-top:35px;break-inside:avoid;page-break-inside:avoid}.signature-block{min-width:0;break-inside:avoid}.signature-name{font-weight:600;font-size:14px;margin-bottom:5px}.signature-details{font-size:11px;color:#58777a;line-height:1.5;white-space:pre-wrap}.signature-space{height:85px;border-bottom:1px solid #408d87}.signature-caption{font-size:11px;color:#577478;margin-top:7px}@media(max-width:500px){.document-tabs button{font-size:13px}.signatures{gap:14px}.signature-space{height:65px}}@media print{.signatures{margin-top:25px;break-inside:avoid;page-break-inside:avoid}.signature-space{height:85px}}
.date-strip{background:#168780;color:#fff;gap:28px;padding:10px 14px;margin:20px 0 18px;border-radius:4px;font-size:12px;line-height:1.35;print-color-adjust:exact;-webkit-print-color-adjust:exact}.date-strip .doc-label{color:#d5f5f2;font-size:10px;letter-spacing:1.2px;margin:0 0 4px}@media print{.date-strip{background:#168780!important;color:#fff!important;print-color-adjust:exact;-webkit-print-color-adjust:exact}.date-strip .doc-label{color:#d5f5f2!important}}
/* Legal paper: compact, single sheet layout. */
#paper{min-height:0;padding:28px 30px}.doc-top{min-height:68px}.doc-logo{max-height:62px}.doc-title{font-size:24px}.rule{margin:15px 0}.pre{line-height:1.4}.date-strip{margin:14px 0;padding:8px 12px}.product-table td{padding-top:8px;padding-bottom:8px}.product-table th{padding-top:8px;padding-bottom:8px}.product-with-thumb img{width:42px;height:42px}.product-main img{width:120px;height:78px}.summary{margin:10px 0 16px auto}.sumrow{padding:6px 0}.sumrow.grand{margin-top:5px;padding-top:10px}.doc-notes{margin-top:14px}.signatures{margin-top:20px;padding-top:16px}.signature-space{height:58px}.doc-footer{margin-top:22px;padding-top:12px}.archive-card .archive-search{margin-top:20px}.archive-results{margin-top:13px;max-height:250px;overflow:auto}.archive-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #d9e7e6;padding:9px 0}.archive-row strong{display:block;font-size:13px}.archive-row small{display:block;margin-top:3px;color:#6a8085;font-size:12px}.archive-row>div:last-child{display:flex;gap:5px}.archive-row button{padding:6px 9px;font-size:12px}button:disabled{opacity:.55;cursor:wait}
@page{size:legal;margin:8mm}@media print{#paper{width:740px;max-width:none;zoom:var(--print-scale,1);min-height:0;padding:12px 0;font-size:11px}.doc-top{min-height:60px}.date-strip{margin:12px 0}.signature-space{height:55px}.summary{margin-bottom:12px}.archive-card{display:none}}

.profile-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.profile-actions .hint{margin:0}.section-heading #newDocument{font-weight:700;color:#0e625e}

body[data-locked="true"] main,body[data-locked="true"] header{display:none}.auth-gate[hidden],#staffPanel[hidden]{display:none!important}.auth-gate{min-height:100vh;padding:28px 14px;display:grid;place-items:center;background:#eaf6f3}.auth-card{background:white;border:1px solid #b5ded8;border-radius:20px;box-shadow:0 16px 46px #204e4b20;padding:28px;max-width:460px;width:100%}.auth-card h1{margin:10px 0}.auth-card form{border-top:1px solid #d4ece7;margin-top:18px;padding-top:14px}.auth-card h2{font-size:1.1rem}.auth-card label{display:grid;gap:4px;margin:10px 0;font-weight:600}.auth-card input{padding:10px;border:1px solid #b5d4d1;border-radius:8px;width:100%}.auth-card button{margin-top:8px;min-height:40px}#authMessage{color:#a52e36}#staffCode{font-family:monospace;width:100%;max-width:540px}.staff-row{padding:8px 0;border-bottom:1px solid #c7e4de;display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap}#accountEmail{font-size:12px;max-width:160px;overflow:hidden;text-overflow:ellipsis}

.install-app{border-color:#168780;color:#176f68;white-space:nowrap}.install-app[hidden]{display:none!important}.install-dialog{max-width:min(420px,calc(100% - 32px));border:0;border-radius:12px;padding:26px;box-shadow:0 14px 60px #123f4340;color:#20373b}.install-dialog::backdrop{background:#123f4380}.install-dialog h2{margin:0 0 12px}.install-dialog p{line-height:1.55}.auth-card>.install-app{width:100%;margin-top:12px}@media(max-width:800px){.actions{flex-wrap:wrap;gap:10px}.actions .install-app{order:3}}@media print{.install-app,.install-dialog{display:none!important}}
