/* App workspace only: document/PDF templates retain their own styling. */
:root{--navy:#172b45;--gold:#b29a62;--line:#dde4ec;--muted:#6c7888;--surface:#f2f5f9}body{height:100dvh;overflow:hidden;display:flex;flex-direction:column;background:var(--surface);color:#25364b;font-family:Arial,sans-serif}.app-header{flex-shrink:0;min-height:78px;padding:10px 26px;border-bottom:1px solid var(--line);background:#fff;gap:20px;box-shadow:none}.brand{gap:14px;color:var(--navy)}.brand-title{font-size:18px;letter-spacing:1.8px}.brand-title small{font-size:10px;letter-spacing:.6px;color:var(--muted);margin-top:5px;font-weight:400}.app-logo{width:54px;flex-shrink:0}.app-logo .official-logo-transparent{width:54px;height:54px}.app-logo .official-logo-transparent img{display:block;width:54px;height:54px;object-fit:contain;clip-path:inset(0 0 11px 0);background:transparent;padding:0}.app-logo .official-logo-name{font-size:7px;line-height:11px;color:#9b7d36}.badge{margin-left:auto;color:#4b5d71;background:#f0f4f8;border:1px solid var(--line)}.header-settings{background:white;color:var(--navy);border:1px solid var(--line);min-height:42px}.workspace-toolbar{flex-shrink:0;display:flex;gap:14px 24px;align-items:center;flex-wrap:wrap;padding:14px 26px 10px;background:#fff;border-bottom:3px solid var(--gold);position:relative;z-index:3}.document-context{min-width:200px;flex:1}.document-context strong{display:block;font-size:22px;color:var(--navy)}.document-context span{display:block;font-size:12px;color:var(--muted);margin-top:5px}.main-actions{display:flex;gap:8px;flex-wrap:wrap}.main-actions button{min-height:44px;padding:12px 18px;font-size:13px;border:1px solid var(--line);background:white;color:var(--navy);border-radius:6px}.main-actions #save,.main-actions #downloadPDF{background:var(--navy);color:#fff;border-color:var(--navy)}.main-actions #issue{border-color:#cbb987;background:#faf6ea;color:#6b5423}.main-actions #new{background:#f2f5f9}.workspace-toolbar #status{flex-basis:100%;margin:0;color:#485f79;font-size:12px;line-height:1.4}.workspace-toolbar #status:empty{display:none}main{flex:1;min-height:0;width:100%;max-width:none;display:grid;grid-template-columns:minmax(480px,1.05fr) minmax(380px,1fr);overflow:hidden;margin:0}.editor-pane{overflow:auto;padding:24px 28px;background:#fff;border-right:1px solid var(--line);min-width:0}.editor-pane h1{font-size:23px;color:var(--navy)}.eyebrow{color:#947b40;margin:0;letter-spacing:1.5px}.editor-tabs{display:flex;gap:4px;background:#f0f3f7;border:1px solid #e4eaf1;padding:5px;border-radius:8px;margin:22px 0;position:sticky;top:-24px;z-index:2;overflow:auto}.editor-tabs button{flex:1;background:transparent;color:#67768b;padding:10px 12px;min-height:42px;font-size:12px;white-space:nowrap;border-radius:5px}.editor-tabs button[aria-selected=true]{background:#fff;color:var(--navy);box-shadow:0 1px 4px #172b451a;border-bottom:2px solid var(--gold)}.editor-panel>section{border:0;padding:0;margin:0}.editor-panel h2{font-size:17px;color:var(--navy);margin-bottom:16px}.editor-panel label{font-size:12px;line-height:1.45;font-weight:600;color:#4d5f76}.editor-panel input,.editor-panel textarea,.editor-panel select,#account input,#account select{font-size:14px;padding:12px;border-color:#d6dfe8;color:#243b53;border-radius:6px;min-height:44px;line-height:1.4}.editor-panel textarea{min-height:85px}.editor-panel input:focus,.editor-panel select:focus,.editor-panel textarea:focus{outline:2px solid #bcc9d8;outline-offset:1px;border-color:#738ca9}.editor-panel .row{gap:16px}.editor-panel .item{background:#f7f9fb;border:1px solid #e3e9f0;padding:18px;border-radius:8px;margin-bottom:16px}.editor-panel .item .row{gap:12px}.editor-panel button:not(.remove),#account button{min-height:42px;border-radius:6px}.editor-panel .secondary,#account .secondary{background:#f1f4f8;color:var(--navy);border:1px solid #d9e2eb}.editor-panel #add{width:100%;border:1px dashed #a2b3c7;padding:14px;min-height:48px;color:var(--navy);background:#f5f8fc}.editor-panel .remove{color:#a75950;min-height:35px}.editor-panel details{border:1px solid var(--line);border-radius:7px;padding:14px;background:#f7f9fc}.editor-panel details summary{color:#52687f;font-size:13px}.section-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 20px;padding-top:20px;border-top:1px solid var(--line)}.section-navigation button{min-height:44px;background:var(--navy);padding:12px 18px}.section-navigation .secondary{background:#f1f4f8;color:var(--navy);border-color:var(--line)}#stepLabel{font-size:12px;color:var(--muted)}#account{margin-top:24px;padding:16px;background:#f7f9fc;border:1px solid var(--line);border-radius:8px}#account summary{font-size:13px;color:#4a6078}.notice{display:none}.preview-pane{overflow:auto;min-width:0;background:#eaf0f6;padding:18px}.preview-tools{position:sticky;top:-18px;z-index:2;background:#eaf0f6;padding:8px 0 14px;margin:0;gap:10px}.preview-tools strong{font-size:14px;color:var(--navy)}.preview-tools label{width:auto;min-width:120px;font-size:10px;color:#64748a}.preview-tools select{padding:8px;font-size:12px;margin-top:4px;border-radius:5px;border-color:#d4dee9}.preview-controls{display:flex;gap:10px;align-items:end}.preview-controls button{height:38px;font-size:12px;color:var(--navy);background:white;border:1px solid #d4dee9}.preview-tools>.actions:empty{display:none}.paperwrap{overflow:auto;padding:16px;margin:0;border-radius:8px;background:#e3eaf2;text-align:center}.paper{margin:0 auto;text-align:start;box-shadow:0 3px 18px #172b4518}.preview-pane #errors{font-size:12px}.preview-focus main{grid-template-columns:1fr}.preview-focus .editor-pane{display:none}.preview-focus .preview-pane{padding:18px max(18px,calc((100vw - 1100px)/2))}.preview-focus .preview-tools{top:-18px}.mobile-view{display:none}#pdfPanel{margin-top:18px;background:white;padding:12px;border-radius:8px}#pdfPanel .previewbar{background:white;padding:0}#pdfFrame{height:70dvh;border-radius:5px}button:focus-visible{outline:3px solid #b5a16b;outline-offset:2px}button:disabled{opacity:.42;cursor:not-allowed}.muted{color:var(--muted)}@media(min-width:1500px){main{grid-template-columns:minmax(550px,.9fr) minmax(650px,1.1fr)}.editor-pane{padding-inline:36px}}@media(max-width:1100px){.app-header{padding-inline:18px}.workspace-toolbar{padding:12px 18px 8px}.document-context{flex-basis:100%;display:flex;gap:14px;align-items:baseline}.document-context strong{font-size:19px}.main-actions{width:100%}.main-actions button{flex:1;padding-inline:10px}main{grid-template-columns:minmax(420px,1fr) minmax(320px,.85fr)}.editor-pane{padding:20px}.preview-pane{padding:12px}.editor-tabs{top:-20px}.preview-tools{top:-12px;gap:8px}.preview-tools>div:first-child{flex-basis:100%}.preview-tools .preview-controls{margin-left:auto}.preview-tools strong{font-size:13px}}@media(max-width:800px){.app-header{min-height:65px;padding:8px 14px;gap:10px}.app-logo{width:44px}.app-logo .official-logo-transparent,.app-logo .official-logo-transparent img{width:44px;height:44px}.app-logo .official-logo-name{font-size:6px;line-height:10px}.brand-title{font-size:14px;letter-spacing:1px}.brand-title small{font-size:9px}.badge{font-size:10px;max-width:120px;padding:6px;overflow-wrap:anywhere}.header-settings{font-size:10px;padding:8px;min-height:38px}.workspace-toolbar{padding:10px 12px;gap:10px}.document-context{display:block;flex:1;min-width:160px}.document-context strong{font-size:18px}.document-context span{font-size:10px}.main-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;order:3}.main-actions button{min-height:41px;padding:9px 5px;font-size:11px}.workspace-toolbar #status{order:4}.mobile-view{display:flex;background:#edf2f7;padding:4px;border-radius:6px}.mobile-view button{font-size:11px;padding:9px 10px;background:transparent;color:#586b81}.mobile-view button[aria-pressed=true]{background:white;color:var(--navy);box-shadow:0 1px 3px #172b4520}main{display:block;overflow:hidden}.editor-pane,.preview-pane{height:100%;padding:18px}.preview-pane{display:none}.mobile-preview .editor-pane,.preview-focus .editor-pane{display:none}.mobile-preview .preview-pane,.preview-focus .preview-pane{display:block}.editor-tabs{top:-18px;margin-top:16px}.editor-tabs button{flex:0 0 auto;padding:9px 13px}.editor-panel .row{gap:10px}.editor-panel .item{padding:12px}.editor-panel label{font-size:11px}.editor-panel input,.editor-panel select,.editor-panel textarea{font-size:13px;padding:10px}.preview-tools{top:-18px}.preview-tools>div:first-child{flex-basis:auto}.preview-focus .preview-pane{padding:18px}.paperwrap{padding:12px}.section-navigation{margin-top:22px}}@media(max-width:440px){.brand-title small{display:none}.badge{max-width:90px;font-size:9px}.brand{gap:8px}.editor-panel .row{flex-wrap:wrap}.editor-panel .row>label{flex-basis:calc(50% - 5px)}}@media print{body{height:auto;display:block;overflow:visible}.app-header,.workspace-toolbar{display:none!important}main{display:block;overflow:visible;height:auto}.preview-pane{display:block!important;padding:0!important;overflow:visible}.paperwrap{background:white;padding:0;overflow:visible}.paper{zoom:1!important;width:auto;padding:0;box-shadow:none}.preview-tools{display:none!important}}
/* Compact business application: flat forms, conventional tabs and toolbars. */
body{font-family:Tahoma,Arial,sans-serif;background:#eceeed;color:#26323c}
.app-header{min-height:64px;background:#233547;border:0;padding:6px 22px;gap:16px}
.brand-title{color:#fff;font-size:17px;letter-spacing:.5px;font-weight:700}
.brand-title small{color:#c8d0d6;letter-spacing:0;font-size:11px}
.app-logo .official-logo-name{color:#c2a45e}
.badge{background:transparent;color:#d3dbe2;border:0;border-radius:0;font-size:11px}
.header-settings{border:1px solid #6c7985;color:white;background:transparent;border-radius:2px;min-height:34px;padding:8px 12px}
.workspace-toolbar{padding:10px 22px;background:#f9faf9;gap:8px 22px;border-bottom:1px solid #afb7bd}
.document-context strong{font-size:19px;font-weight:700;color:#253547}
.document-context span{font-size:11px;color:#56616a;margin-top:4px}
.main-actions{gap:5px}
.main-actions button{border-radius:2px;min-height:38px;padding:9px 14px;font-family:inherit;font-size:12px;background:#fff;border-color:#bfc6cb;color:#263746}
.main-actions #save,.main-actions #downloadPDF{background:#29455d;border-color:#29455d}
.main-actions #issue{background:#f4f0e5;border-color:#c8bb96;color:#665429}
.workspace-toolbar #status{font-size:11px}
main{grid-template-columns:minmax(480px,1fr) minmax(380px,1fr)}
.editor-pane{padding:18px 22px;background:#fff;border-color:#bfc6cc}
.editor-tabs{border:0;border-bottom:1px solid #aeb8c0;border-radius:0;background:#fff;gap:0;padding:0;margin:0 0 22px;top:-18px;overflow:auto}
.editor-tabs button{border-radius:0;border:1px solid transparent;border-bottom:0;background:#f0f2f3;min-height:39px;color:#485762;padding:10px 14px;font-family:inherit;font-size:12px}
.editor-tabs button+button{border-left:1px solid #d0d6da}
.editor-tabs button[aria-selected=true]{background:#fff;color:#203b52;box-shadow:none;border:1px solid #aeb8c0;border-bottom:0;border-top:3px solid #29455d;font-weight:700}
.editor-panel h2{font-size:15px;margin:0 0 18px;padding:0 0 8px;border-bottom:1px solid #d9dfe2;color:#2b3b46}
.editor-panel label{font-family:inherit;font-size:12px;font-weight:400;color:#3e4e5a}
.editor-panel input,.editor-panel textarea,.editor-panel select,#account input,#account select{font-family:inherit;font-size:13px;border-radius:2px;min-height:38px;padding:9px 10px;border-color:#bcc6ce;color:#1e2b35;background:#fff}
.editor-panel textarea{min-height:64px}
.editor-panel .row{gap:12px}
.editor-panel .item{border:0;border-top:2px solid #758592;border-bottom:1px solid #d5dde2;background:#f6f7f7;border-radius:0;padding:14px 12px;margin-bottom:24px}
.editor-panel .item .row{gap:10px}
.editor-panel button:not(.remove),#account button,.section-navigation button{border-radius:2px;min-height:36px;font-family:inherit;font-size:12px}
.editor-panel #add{border:1px solid #abb9c4;border-radius:2px;background:#eef2f4;min-height:38px;padding:10px}
.editor-panel details,#account{border-radius:0;background:#f7f8f8;border-color:#d0d7dc;padding:12px}
.section-navigation{margin:22px 0 18px;padding-top:16px}
.section-navigation button{padding:9px 14px;background:#29455d}
.preview-pane{background:#d9dee1;padding:14px 18px}
.preview-tools{background:#d9dee1;top:-14px;padding:4px 0 12px;gap:10px}
.preview-tools strong{font-size:12px;color:#344550}
.preview-tools select,.preview-controls button{border-radius:2px;border-color:#aebbc4;font-family:inherit}
.preview-tools label{font-size:10px;color:#42515c}
.paperwrap{border-radius:0;background:#cdd4d9;padding:16px}
.paper{box-shadow:0 1px 5px #24344126}
#pdfPanel,#pdfFrame{border-radius:0}
.mobile-view{border-radius:2px}
.mobile-view button{border-radius:2px;font-family:inherit}
button:focus-visible{outline:2px solid #688da8;outline-offset:2px}
@media(min-width:1500px){.editor-pane{padding-inline:28px}}
@media(max-width:1100px){.document-context strong{font-size:18px}.workspace-toolbar{padding:10px 18px}.editor-pane{padding:18px}.preview-pane{padding:14px}.preview-tools{top:-14px}}
@media(max-width:800px){.app-header{padding:6px 12px;min-height:60px}.brand-title{font-size:14px}.badge{font-size:9px}.header-settings{font-size:10px;padding:6px}.workspace-toolbar{padding:9px 12px}.main-actions button{min-height:38px;padding:9px 4px;font-size:11px}.editor-pane{padding:16px}.editor-tabs{top:-16px;margin:0 0 20px}.editor-tabs button{padding:10px 13px}.preview-pane{padding:14px}.preview-tools{top:-14px}}
@media print{.preview-pane,.paperwrap{background:white}.paper{box-shadow:none}}
/* Final professional workspace refinement. */
.app-header{min-height:70px;padding:8px 24px;background:#1d3042;border-bottom:2px solid #ab9259}
.brand-title{font-size:18px;letter-spacing:.8px}.brand-title small{font-weight:400;font-size:11px;color:#c0cbd4;margin-top:4px}
.header-settings{border-color:#617180;background:#263b4e;min-height:36px}
.workspace-toolbar{padding:12px 24px;background:#fff;border-bottom:1px solid #cbd3d9}
.document-context strong{font-size:20px;letter-spacing:0}.document-context span{color:#697782;font-size:11px}
.main-actions button{min-height:40px;padding:10px 15px;border-color:#c3ccd3;background:#f9fafb}
.main-actions #save{background:#fff;color:#29455d;border-color:#8b9dab}
.main-actions #downloadPDF{background:#29455d;color:#fff}
.main-actions #new{margin-right:8px;background:#f2f4f6}
.main-actions #issue{margin-left:8px;background:#f4f0e5}
.main-actions button:hover:not(:disabled){filter:none;background:#e9eef2;color:#203b52}
.main-actions #downloadPDF:hover:not(:disabled){background:#20394e;color:#fff}
.editor-pane{padding:20px 24px;background:#fff}
.editor-tabs{top:-20px;margin-bottom:20px;border-bottom:1px solid #bdc8d1;background:white}
.editor-tabs button{background:white;border:0;border-bottom:3px solid transparent;color:#64717d;min-height:42px;font-size:12px;padding:12px 10px}
.editor-tabs button+button{border-left:0}
.editor-tabs button[aria-selected=true]{border:0;border-bottom:3px solid #29455d;color:#203b52;background:#f3f6f8}
.editor-tabs button:hover{filter:none;background:#f3f6f8}
.editor-panel label{margin:10px 0;font-size:12px;color:#4b5b68}
.editor-panel input,.editor-panel select,.editor-panel textarea{border-color:#c2cdd5;padding:10px 11px;min-height:40px;margin-top:5px;color:#263642}
.editor-panel input:focus,.editor-panel select:focus,.editor-panel textarea:focus{outline:2px solid #d9e4eb;outline-offset:0;border-color:#738da3}
.editor-panel .row{gap:16px}
.editor-panel h2{font-size:14px;font-weight:700;letter-spacing:.1px;color:#293f50;border-color:#e0e6eb;margin-bottom:14px}
.editor-panel .item{background:white;border:1px solid #cbd5dc;padding:0 14px 12px;margin-bottom:18px;counter-increment:line-item}
#items{counter-reset:line-item}
.editor-panel .item::before{content:'ITEM ' counter(line-item,decimal-leading-zero);display:block;background:#f1f4f6;border-bottom:1px solid #d6dfe5;margin:0 -14px 12px;padding:9px 14px;font-size:11px;font-weight:700;letter-spacing:.5px;color:#43596a}
.editor-panel .item .row{gap:12px}
.editor-panel .remove{font-family:inherit;color:#8b4840;padding:8px 0;font-size:11px}
.editor-panel details,#account{background:#f8fafb;border:1px solid #dde4e9}
#account:not([open]){display:none}
#convert{background:#f3f6f8;border:1px solid #cbd5dd;color:#334f63;border-radius:2px;font-family:inherit;font-size:12px}
.historyentry{padding:10px 0;border-bottom:1px solid #e0e6eb;font-size:12px}
.historyentry button{background:#29455d;border-radius:2px;min-height:34px;padding:8px 12px}
.section-navigation{border-color:#e0e6eb}
.preview-pane{background:#e6eaed;padding:18px 20px}
.preview-tools{background:#e6eaed;top:-18px;gap:12px;padding:0 0 14px}
.preview-tools strong{font-size:13px;font-weight:700}.preview-tools small{color:#667783;font-size:10px}
.preview-tools select,.preview-controls button{height:36px;border-color:#bcc9d2;background:#fff}
.paperwrap{background:#d8dfe4;padding:18px;border:1px solid #ccd5dc}
.paper{box-shadow:0 2px 7px #283e5120}
.preview-focus .preview-pane{background:#e6eaed}
@media(min-width:1500px){main{grid-template-columns:minmax(520px,.85fr) minmax(650px,1.15fr)}}
@media(max-width:1100px){.workspace-toolbar{padding:12px 18px}.main-actions #new{margin-right:0}.main-actions #issue{margin-left:0}.editor-pane{padding:18px}.editor-tabs{top:-18px}.preview-pane{padding:16px}.preview-tools{top:-16px}}
@media(max-width:800px){.app-header{padding:8px 12px;min-height:62px}.brand-title{font-size:14px}.workspace-toolbar{padding:10px 12px}.main-actions button{min-height:40px;padding:10px 4px}.editor-pane{padding:16px}.editor-tabs{top:-16px}.editor-tabs button{padding:12px 13px}.editor-panel input,.editor-panel select,.editor-panel textarea{font-size:14px}.preview-pane{padding:14px}.preview-tools{top:-14px}.paperwrap{padding:12px}}
@media print{.preview-pane,.paperwrap{background:white;border:0}.paper{box-shadow:none}}
/* Spreadsheet-like item editing. */
.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}
.item-table-scroll{overflow-x:auto;border:1px solid #c7d2db}
.item-editor-table{width:100%;min-width:650px;margin:0;border-collapse:collapse;table-layout:fixed;font-family:Tahoma,Arial,sans-serif;font-size:12px}
.item-editor-table thead th{background:#eaf0f4;color:#344f63;font-weight:700;padding:10px 6px;border-bottom:1px solid #bccbd6;white-space:nowrap}
.item-editor-table tbody th{font-weight:400;color:#73818c;background:#f5f7f9;padding:13px 5px;text-align:center;border-bottom:1px solid #dce3e8}
.item-editor-table td{padding:5px 4px;border-bottom:1px solid #dce3e8;vertical-align:top;background:#fff}
.item-editor-table tr:last-child td,.item-editor-table tr:last-child th{border-bottom:0}
.item-editor-table tr:focus-within td{background:#f3f7fa}
.editor-panel .item-editor-table label{margin:0;font-size:12px}
.editor-panel .item-editor-table input,.editor-panel .item-editor-table select,.editor-panel .item-editor-table textarea{margin:0;padding:7px 5px;min-height:34px;height:34px;font-size:12px;border:1px solid transparent;border-radius:0;background:transparent}
.editor-panel .item-editor-table input:hover,.editor-panel .item-editor-table textarea:hover,.editor-panel .item-editor-table select:hover{border-color:#c3d0da;background:white}
.editor-panel .item-editor-table input:focus,.editor-panel .item-editor-table textarea:focus,.editor-panel .item-editor-table select:focus{border-color:#7895ac;background:white}
.editor-panel .item-editor-table textarea{resize:vertical;line-height:18px;min-height:34px}
.editor-panel .item-editor-table input[type=number]{appearance:textfield;-moz-appearance:textfield;text-align:right}
.item-editor-table input::-webkit-inner-spin-button{appearance:none}
.editor-panel .item-editor-table .item-translation{margin:1px 0 0;padding:0;border:0;background:transparent}
.item-translation summary{font-size:10px;color:#657d90;padding:3px 5px}
.editor-panel .item-editor-table .remove{background:transparent;color:#96605a;font-size:20px;line-height:24px;padding:4px;width:26px;min-height:32px;border-radius:0}
.editor-panel .item-editor-table .remove:hover{background:#f5e8e6;filter:none}
.editor-panel #add{margin-top:12px}
@media(min-width:1101px){body:not(.preview-focus):has(#tab-items[aria-selected=true]) main{grid-template-columns:minmax(680px,1.3fr) minmax(350px,.7fr)}}
@media(max-width:800px){.item-editor-table{min-width:650px}.item-table-scroll{margin-inline:-4px}}

.discount-entry-label{display:block;padding:2px 5px 0;font-size:10px;color:#526b7e;white-space:nowrap;font-weight:600}
.item-editor-table .item-amount-heading{text-align:right}
.item-editor-table td.item-amount{padding:14px 8px;text-align:right;font-weight:700;color:#29455d;white-space:nowrap;font-variant-numeric:tabular-nums;background:#f4f7f9}
.item-editor-table:has(.item-amount){min-width:760px}
@media(min-width:1101px){body:not(.preview-focus):has(#tab-items[aria-selected=true]) main{grid-template-columns:minmax(810px,1.5fr) minmax(310px,.6fr)}}

.app-logo .official-logo-transparent img{clip-path:none;background:transparent;object-fit:contain}

.preview-pane #pdfPanel{margin-top:0;padding:0;background:transparent}.preview-pane #pdfFrame{height:calc(100dvh - 285px);min-height:350px;width:100%;background:#dce2e7}.preview-pane .zoom-label{display:none}.preview-pane .paperwrap:not([hidden]){display:block!important}
/* Simple company document workspace: light header, restrained branding. */
.app-header{background:#fff;border-bottom:1px solid #d7dde2;color:#283540;min-height:68px;padding:8px 24px}.brand-title{color:#263744;font-size:18px;letter-spacing:.6px}.brand-title small{color:#77818a;font-size:11px;font-weight:400}.badge{color:#67737d;background:#f6f7f8;border:1px solid #e2e6e9;padding:7px 10px;border-radius:2px}.header-settings{background:#fff;color:#41515e;border:1px solid #cfd6dc;min-height:36px;font-weight:500}.header-settings:hover{background:#f3f5f6;filter:none}.workspace-toolbar{background:#fafbfb;border-bottom:1px solid #dce1e5}.document-context strong{color:#2b3b47}.main-actions #downloadPDF{background:#344b5d;border-color:#344b5d}.main-actions #save{color:#344b5d;border-color:#bdc8d0}.editor-tabs button[aria-selected=true]{border-bottom-color:#a88b48;background:#f7f8f8;color:#2d414f}.preview-pane,.preview-tools{background:#eef0f2}.brand{gap:12px}.app-logo{width:46px}.app-logo .official-logo-transparent,.app-logo .official-logo-transparent img{width:46px;height:50px}.preview-pane #pdfPanel>.previewbar strong{font-size:11px;font-weight:400;color:#6a7781;background:transparent}.section-navigation button{background:#344b5d}
@media(max-width:800px){.app-header{padding:8px 12px;min-height:60px}.brand-title{font-size:14px}.app-logo{width:36px}.app-logo .official-logo-transparent,.app-logo .official-logo-transparent img{width:36px;height:42px}.badge{font-size:9px;padding:5px}.header-settings{font-size:10px;padding:7px}}
/* Sama Eridu charcoal workspace, inspired by the supplied brand reference. */
body{--navy:#b9ccd9;--muted:#a0abb3;--line:#45505a;--surface:#191a19;background:#191a19;color:#edf0f2;font-family:Arial,Tahoma,sans-serif}
.app-header{background:#191a19;border-bottom:1px solid #333b3e;color:#eef0ef;min-height:72px;padding:10px 24px}.brand-title{color:#c5aa69;letter-spacing:1px;font-family:Georgia,serif;font-size:19px;font-weight:400}.brand-title small{font-family:Arial,sans-serif;color:#c2c6c5;font-size:9px;letter-spacing:.8px;text-transform:uppercase}.badge{color:#c1c9cb;background:#252a2c;border:1px solid #3c4549;border-radius:16px;padding:8px 12px}.header-settings{color:#eee9de;background:linear-gradient(130deg,#384047,#524b3d);border:1px solid #66645b;border-radius:18px;padding:9px 15px;box-shadow:0 2px 8px #0003}.header-settings:hover{background:#4b5358;color:white}
.workspace-toolbar{background:#202425;border-bottom:1px solid #3c454b;padding:13px 24px;gap:10px 22px}.document-context strong{color:#f0f2f3;font-size:21px}.document-context span{color:#a8b3ba}.main-actions button{border-radius:6px;background:#30383e;color:#e1e7eb;border-color:#505b64;font-weight:500}.main-actions #new{background:#262e33;color:#dbe2e7}.main-actions #save{background:#35424b;color:#e5edf2;border-color:#647987}.main-actions #downloadPDF{background:#7d99aa;color:#101c25;border-color:#8ba3b3;font-weight:700;box-shadow:0 2px 8px #7d99aa25}.main-actions #issue{background:#4c4535;color:#ddc88d;border-color:#776a47}.main-actions button:hover:not(:disabled){background:#46545e;color:white;filter:none}.main-actions #downloadPDF:hover:not(:disabled){background:#91acbe;color:#101c25}.workspace-toolbar #status{color:#c6d1d9}
main{background:#191d20}.editor-pane{background:linear-gradient(135deg,#272d31,#22282c);border-right:1px solid #45505a;padding:20px 24px}.editor-tabs{background:#262d31;border-bottom:1px solid #53616a}.editor-tabs button{color:#aab8c2;background:transparent;border-radius:4px 4px 0 0}.editor-tabs button[aria-selected=true]{background:#354047;color:#f4ecd8;border-bottom-color:#bca064}.editor-tabs button:hover{background:#343e45;color:#fff}.editor-panel h2{color:#e3e9ed;border-color:#46535c;font-weight:500;font-size:16px}.editor-panel label{color:#bdc9d2}.editor-panel input,.editor-panel textarea,.editor-panel select,#account input,#account select{color:#f1f4f6;background:#3a444d;border:1px solid #596570;border-radius:6px;font-size:13px;color-scheme:dark;box-shadow:inset 0 1px 4px #0001}.editor-panel input:focus,.editor-panel textarea:focus,.editor-panel select:focus{background:#404d57;border-color:#99b3c5;outline:2px solid #7d99aa30}.editor-panel .secondary,#account .secondary{background:#38434b;border-color:#5c6b76;color:#e1e9ee}.editor-panel button:not(.remove),#account button{background:#657f90;color:#fff;border-radius:5px}.editor-panel #add{background:#364550;border-color:#667f90;color:#dfebf3}.editor-panel details,#account{background:#293239;border:1px solid #485762;border-radius:6px}.editor-panel details summary,#account summary{color:#c4d1da}.muted,#stepLabel{color:#a3b3bf}.section-navigation{border-color:#46545d}.section-navigation button{background:#6e8a9c;color:#fff}.section-navigation .secondary{background:#303c45;border-color:#526575;color:#cedde8}#convert{background:#35414a;border-color:#5b6b77;color:#d1dde5;border-radius:5px}button:disabled{opacity:.38}.historyentry{border-color:#45545f;color:#ccd7df}.historyentry button{background:#5f7b8e}
.preview-pane,.preview-tools,.preview-focus .preview-pane{background:#1d2226}.preview-tools strong{color:#e0e6ea}.preview-tools small{color:#9dabb5}.preview-tools label{color:#b3c0ca}.preview-tools select,.preview-controls button{background:#36414a;color:#e4edf3;border-color:#566570;border-radius:5px;color-scheme:dark}.preview-pane #pdfPanel>.previewbar strong{color:#9eafb9;background:transparent}.preview-pane #pdfFrame{border:1px solid #495762;border-radius:5px;background:#242c32}.mobile-view{background:#303a42}.mobile-view button{color:#aebfcb}.mobile-view button[aria-pressed=true]{background:#607e92;color:#fff}
.item-table-scroll{border-color:#50616e;border-radius:5px}.item-editor-table thead th{background:#33424e;color:#dce7ef;border-color:#536775}.item-editor-table tbody th{background:#29363f;color:#9fb3c2;border-color:#425563}.item-editor-table td{background:#303d46;border-color:#485b68}.item-editor-table tr:focus-within td{background:#3b4e5b}.editor-panel .item-editor-table input,.editor-panel .item-editor-table select,.editor-panel .item-editor-table textarea{color:#eef4f7;background:transparent}.editor-panel .item-editor-table input:hover,.editor-panel .item-editor-table select:hover,.editor-panel .item-editor-table textarea:hover{background:#425563;border-color:#6a8191}.editor-panel .item-editor-table input:focus,.editor-panel .item-editor-table select:focus,.editor-panel .item-editor-table textarea:focus{background:#425563;border-color:#a1bbcc}.item-editor-table td.item-amount{background:#2b3944;color:#dfecf4}.discount-entry-label,.item-translation summary{color:#adc5d6}.editor-panel .item-editor-table .remove{color:#dba59b}.editor-panel .item-editor-table .remove:hover{background:#614840}.download-again,#status a{color:#e0c68b}
@media(max-width:800px){.app-header{padding:8px 12px;min-height:64px}.brand-title{font-size:16px}.header-settings{padding:8px;font-size:10px}.workspace-toolbar{padding:10px 12px}.editor-pane{padding:16px}}
@media print{body{background:white;color:#222}.preview-pane{background:white!important}}
.preview-pane #pdfPanel .previewbar{background:transparent}.item-table-scroll{scrollbar-color:#667d8d #26323a}.editor-panel .item-editor-table textarea,.editor-panel .item-editor-table input{font-weight:400}

.theme-switch{margin-left:auto;white-space:nowrap}.app-header .badge{margin-left:0}
body[data-theme=light]{--navy:#29455d;--muted:#6c7888;--line:#d5dee5;--surface:#f2f5f7;background:#eef1f3;color:#273946}
body[data-theme=light] .app-header{background:white;border-color:#d6dee4;color:#263744}body[data-theme=light] .brand-title{color:#a18443}body[data-theme=light] .brand-title small{color:#6c7882}body[data-theme=light] .badge{background:#f4f6f8;color:#62727e;border-color:#dce3e8}body[data-theme=light] .header-settings{background:#f8f9fa;color:#364d60;border-color:#ced8df;box-shadow:none}
body[data-theme=light] .workspace-toolbar{background:#fafbfc;border-color:#d4dde4}body[data-theme=light] .document-context strong{color:#253d50}body[data-theme=light] .document-context span,body[data-theme=light] .workspace-toolbar #status{color:#627787}body[data-theme=light] .main-actions button,body[data-theme=light] .main-actions #new,body[data-theme=light] .main-actions #save{background:#fff;color:#344e61;border-color:#c4d1db}body[data-theme=light] .main-actions #downloadPDF{background:#647f91;color:white;border-color:#647f91}body[data-theme=light] .main-actions #issue{background:#f5f0e3;color:#79602c;border-color:#d6c79d}
body[data-theme=light] main{background:#f2f5f7}body[data-theme=light] .editor-pane{background:#fff;border-color:#d4dde5}body[data-theme=light] .editor-tabs{background:#fff;border-color:#d3dde5}body[data-theme=light] .editor-tabs button{color:#64798a;background:transparent}body[data-theme=light] .editor-tabs button[aria-selected=true]{background:#f1f5f8;color:#2d475a;border-bottom-color:#ab8e4d}body[data-theme=light] .editor-panel h2{color:#2a4458;border-color:#dce4ea}body[data-theme=light] .editor-panel label{color:#536d80}
body[data-theme=light] .editor-panel input,body[data-theme=light] .editor-panel textarea,body[data-theme=light] .editor-panel select,body[data-theme=light] #account input,body[data-theme=light] #account select{background:#f7f9fb;color:#263e50;border-color:#cad6df;color-scheme:light;box-shadow:none}body[data-theme=light] .editor-panel details,body[data-theme=light] #account{background:#f3f6f8;border-color:#d6e0e7}body[data-theme=light] .editor-panel summary,body[data-theme=light] #account summary{color:#587184}body[data-theme=light] .editor-panel #add,body[data-theme=light] #convert,body[data-theme=light] .section-navigation .secondary{background:#edf3f7;border-color:#c5d4df;color:#38566c}body[data-theme=light] .section-navigation{border-color:#dbe4eb}body[data-theme=light] .muted,body[data-theme=light] #stepLabel{color:#6d8392}
body[data-theme=light] .preview-pane,body[data-theme=light] .preview-tools{background:#e8edf1}body[data-theme=light] .preview-tools strong{color:#365266}body[data-theme=light] .preview-tools label,body[data-theme=light] .preview-tools small{color:#687f90}body[data-theme=light] .preview-tools select,body[data-theme=light] .preview-controls button{background:white;color:#3d596e;border-color:#c6d4df;color-scheme:light}body[data-theme=light] #pdfFrame{background:#dce5ec;border-color:#c4d3df}body[data-theme=light] .preview-pane #pdfPanel>.previewbar strong{color:#657f91}
body[data-theme=light] .item-table-scroll{border-color:#c8d7e2;scrollbar-color:#8ca5b8 #edf2f6}body[data-theme=light] .item-editor-table thead th{background:#e6eef4;color:#385a73;border-color:#bccfdd}body[data-theme=light] .item-editor-table tbody th{background:#f2f6f9;color:#6a8497;border-color:#d2dfe9}body[data-theme=light] .item-editor-table td{background:#fff;border-color:#d5e1ea}body[data-theme=light] .item-editor-table td.item-amount{background:#edf4f9;color:#355a76}body[data-theme=light] .editor-panel .item-editor-table input,body[data-theme=light] .editor-panel .item-editor-table select,body[data-theme=light] .editor-panel .item-editor-table textarea{background:transparent;color:#2f4c62}body[data-theme=light] .discount-entry-label,body[data-theme=light] .item-translation summary{color:#64849c}body[data-theme=light] .item-editor-table tr:focus-within td{background:#f1f7fb}body[data-theme=light] .editor-panel .item-editor-table input:focus,body[data-theme=light] .editor-panel .item-editor-table textarea:focus,body[data-theme=light] .editor-panel .item-editor-table select:focus{background:white;border-color:#829eb2}body[data-theme=light] .historyentry{color:#456176;border-color:#d6e2eb}body[data-theme=light] #status a{color:#876b30}
@media(max-width:800px){.app-header{flex-wrap:wrap;gap:8px}.theme-switch{font-size:10px;padding:7px 10px}.app-header .badge{order:4;margin-left:auto}.header-settings{min-height:32px}}
/* Responsive brand treatment, shared touch sizing for both appearances. */
body[data-theme=dark]{background:#191a18;color:#eef1f3}
body[data-theme=dark] .app-header{background:#191a18}
body[data-theme=dark] main{background:#191a18}
body[data-theme=dark] .editor-pane{background:radial-gradient(ellipse at 0% 100%,#6b849321,transparent 45%),linear-gradient(135deg,#2e3335,#262b2e);box-shadow:inset 0 1px 0 #ffffff08}
body[data-theme=dark] .editor-panel input,body[data-theme=dark] .editor-panel textarea,body[data-theme=dark] .editor-panel select{background:#3d464d;border-color:#657179;border-radius:8px;color:#f6f8fa;font-weight:400;box-shadow:inset 0 2px 8px #0000000d}
body[data-theme=dark] .main-actions #downloadPDF{background:#829ead;color:#101d25;box-shadow:0 0 12px #819dad30}
body[data-theme=dark] .header-settings{background:linear-gradient(125deg,#3b4347,#554b37);border-color:#706955;color:#f1ebdf;box-shadow:0 1px 8px #c4ae7720}
body[data-theme=dark] .preview-pane,body[data-theme=dark] .preview-tools{background:#1b201f}
.editor-tabs button,.main-actions button,.header-settings,.section-navigation button,.mobile-view button{min-height:44px}
.editor-panel label{line-height:1.5}.header-settings:focus-visible,.main-actions button:focus-visible,.editor-tabs button:focus-visible{outline:3px solid #bda66e;outline-offset:2px}
body[data-theme=light] .main-actions button:hover:not(:disabled),body[data-theme=light] .header-settings:hover,body[data-theme=light] .editor-tabs button:hover{background:#e9f0f5;color:#29465c}
body[data-theme=light] .mobile-view{background:#e3eaf0}body[data-theme=light] .mobile-view button{color:#455f73}body[data-theme=light] .mobile-view button[aria-pressed=true]{background:white;color:#29465c;box-shadow:0 1px 3px #233c5020}
body[data-theme=light] .editor-panel .secondary,body[data-theme=light] #account .secondary{background:#edf3f7;color:#38566b;border-color:#cad8e2}body[data-theme=light] .editor-panel .item-editor-table input:hover,body[data-theme=light] .editor-panel .item-editor-table textarea:hover,body[data-theme=light] .editor-panel .item-editor-table select:hover{background:#edf4f9;border-color:#c1d2df}
@media(min-width:801px) and (max-width:1199px){.app-header{gap:12px;padding:10px 18px;flex-wrap:wrap}.app-header .brand{flex:1}.app-header .theme-switch{margin-left:0}.app-header .badge{font-size:11px}.workspace-toolbar{padding:12px 18px}.main-actions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%}.main-actions button{font-size:12px;padding:10px 5px;min-height:46px}main,body:not(.preview-focus):has(#tab-items[aria-selected=true]) main{grid-template-columns:minmax(400px,1.1fr) minmax(300px,.9fr)}.editor-pane{padding:18px}.editor-tabs{top:-18px}.editor-tabs button{font-size:12px;padding:12px 8px}.editor-panel input,.editor-panel select,.editor-panel textarea{font-size:16px;min-height:44px}.preview-pane{padding:14px}.preview-tools{top:-14px}.preview-pane #pdfFrame{height:calc(100dvh - 310px)}.item-editor-table{min-width:720px}.editor-panel .item-editor-table input,.editor-panel .item-editor-table select,.editor-panel .item-editor-table textarea{font-size:14px;min-height:40px;height:40px}.preview-focus main{grid-template-columns:1fr}}
@media(max-width:800px){.app-header{padding:8px 12px;gap:8px;align-items:center;min-height:66px}.app-header .brand{flex:1;min-width:145px}.brand-title{font-size:16px}.brand-title small{font-size:8px}.header-settings{font-size:12px;padding:9px 11px;min-height:44px}.app-header .badge{display:none}.theme-switch{margin-left:0}.document-context{min-width:150px}.document-context strong{font-size:19px}.document-context span{font-size:11px}.workspace-toolbar{padding:10px 12px;gap:10px}.mobile-view{padding:3px}.mobile-view button{min-height:44px;padding:10px 14px;font-size:13px}.main-actions button{font-size:12px;min-height:44px;padding:10px 5px}.workspace-toolbar #status{font-size:12px;line-height:1.4}.editor-pane{padding:16px}.editor-tabs{top:-16px;gap:0}.editor-tabs button{min-height:46px;padding:13px 15px;font-size:13px}.editor-panel label{font-size:13px}.editor-panel input,.editor-panel select,.editor-panel textarea,#account input,#account select{font-size:16px;min-height:46px;padding:11px 12px}.editor-panel .row{flex-wrap:wrap;gap:12px}.editor-panel .row>label{flex-basis:calc(50% - 6px)}.editor-panel button:not(.remove),#account button,#convert,.section-navigation button{min-height:44px;font-size:13px}.item-table-scroll{margin-inline:0;scrollbar-width:auto}.item-editor-table{min-width:760px}.item-editor-table thead th{font-size:12px;padding:12px 6px}.editor-panel .item-editor-table input,.editor-panel .item-editor-table textarea,.editor-panel .item-editor-table select{font-size:16px;min-height:44px;height:44px;padding:10px 5px}.editor-panel .item-editor-table .remove{min-height:44px;width:28px;font-size:24px}.item-translation summary{padding:8px 5px;font-size:12px}.discount-entry-label{font-size:11px}.preview-tools strong{font-size:14px}.preview-tools select,.preview-controls button{min-height:44px;font-size:14px}.preview-pane #pdfFrame{height:calc(100dvh - 340px);min-height:300px}.preview-pane #pdfPanel>.previewbar strong{font-size:12px;line-height:1.5}.section-navigation{gap:8px}.section-navigation button{padding:10px 12px}.preview-focus .preview-pane{padding:14px}}
@media(max-width:430px){.app-header .brand{flex-basis:100%;justify-content:flex-start}.app-header .theme-switch,.app-header #staffSettings{flex:1}.brand-title small{display:block}.app-header .app-logo{width:28px}.app-header .app-logo .official-logo-transparent,.app-header .app-logo .official-logo-transparent img{width:28px;height:36px}.app-header{min-height:100px}.main-actions button{font-size:11px}.editor-panel .row>label{flex-basis:100%}.preview-pane #pdfFrame{height:calc(100dvh - 385px);min-height:280px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.saved-item-picker{padding:12px;margin-bottom:16px;border:1px solid #526471;border-radius:6px}.saved-item-picker .actions{flex-wrap:wrap}.saved-item-picker .actions button{flex:1;min-height:44px}body[data-theme=light] .saved-item-picker{background:#f4f7fa;border-color:#ccdbe5}

.history-filters{display:grid;grid-template-columns:2fr 1fr;gap:12px;margin-bottom:16px}.historyentry{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:14px 0}.history-info{flex:1;min-width:180px}.history-actions{display:flex;flex-wrap:wrap;gap:8px}.history-actions button{min-height:44px}#relatedDialog{width:min(460px,calc(100vw - 32px));box-sizing:border-box;padding:24px;border:1px solid #bec5cb;border-radius:10px;background:#fff;color:#202a33}#relatedDialog::backdrop{background:#0009}#relatedForm{display:grid;gap:14px}#relatedForm h2,#relatedForm p{margin:0}#relatedForm label{display:grid;gap:6px}body[data-theme="dark"] #relatedDialog{background:#292e32;color:#f0f2f4;border-color:#56616a}body[data-theme="dark"] #relatedDialog input{background:#39424a;color:#fff}@media(max-width:600px){.history-filters{grid-template-columns:1fr}.history-actions{width:100%}.history-actions button{flex:1}}

.app-update-notice{padding:12px 20px;background:#fff4ce;color:#263541;border-bottom:1px solid #c9b675;font-size:14px}.app-update-notice button{margin-left:12px;min-height:44px;color:#263541;background:#fff;border:1px solid #a9b4bd}

#errors[data-state="incomplete"]{background:transparent;color:inherit;border:0;padding:8px 0;font-size:13px}


