
:root{--ink:#183e36;--paper:#f4f2eb;--line:#dcded5;--orange:#dc673e}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px 'Segoe UI',sans-serif}button,input,select{font:inherit}button{cursor:pointer;border:0;border-radius:8px;padding:12px 20px;background:var(--ink);color:white}button.secondary{background:#e6e9df;color:var(--ink)}button:focus-visible,a:focus-visible,input:focus,select:focus{outline:3px solid #dc673e;outline-offset:2px}header{padding:22px 5%;background:var(--ink);color:white;display:flex;justify-content:space-between;align-items:center}header b{font-size:25px}header span{color:#d2dcd1;font-size:14px}main{max-width:1320px;margin:auto;padding:40px 30px}.hero{display:flex;justify-content:space-between;align-items:center;gap:20px}h1{font-size:42px;letter-spacing:-1.5px;margin:8px 0}h2{font-size:22px;margin:0 0 18px}p{line-height:1.7}.eyebrow{color:#9b482d;font-weight:700}.muted{color:#64766d;font-size:14px}.notice{background:#e7eadd;padding:14px 20px;border-radius:9px;margin:24px 0;line-height:1.6}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:28px 0}.stat{border-top:3px solid var(--ink);padding:22px;background:white}.stat strong{display:block;font-size:33px;margin-top:8px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:22px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px}.filters{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}input,select{background:white;border:1px solid #c8d0c6;border-radius:7px;padding:10px;width:100%;color:var(--ink);min-width:0}.filters>*{width:auto;max-width:100%}label{display:block;font-size:14px;font-weight:600;margin-bottom:14px}label input,label select{display:block;margin-top:7px}.scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:right;white-space:nowrap}th{color:#66766e;font-size:12px;background:#f7f8f3}td,th{padding:14px 10px;border-bottom:1px solid #e9ece5}td button{font-size:13px;padding:7px 10px}.badge{font-size:12px;padding:5px 8px;border-radius:5px;background:#f9ebd9;color:#805619}.badge.ok{background:#e4efdf;color:#36592b}.empty{text-align:center;padding:42px 12px;white-space:normal;color:#64766d}.result{background:#f2f4ed;border-radius:8px;padding:20px;margin-top:16px;line-height:1.9}.result strong{font-size:25px;display:block}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}footer{font-size:13px;color:#64766d;margin-top:25px}dialog{border:0;border-radius:14px;padding:0;width:min(960px,95vw);color:var(--ink)}dialog::backdrop{background:#102820b5}.dialog-head{padding:24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.dialog-head h2{margin:0}.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:24px}.preview{background:#f3f3ed;min-height:300px;border:1px dashed #c3cabe;border-radius:9px;padding:15px;text-align:center;overflow:hidden}.preview img{max-width:100%;max-height:450px;object-fit:contain}.preview iframe{border:0;width:100%;height:430px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.full{grid-column:1/-1}.error{color:#a33020;font-weight:600;line-height:1.5}.toast{position:fixed;bottom:24px;left:24px;background:var(--ink);color:white;padding:16px;border-radius:8px;z-index:5;max-width:90vw}.mini{font-size:12px}.file-label{border:1px dashed #94aa99;padding:18px;border-radius:8px}.file-label input{border:0;padding:0} @media(max-width:900px){.layout{grid-template-columns:1fr}.edit-grid{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}h1{font-size:34px}main{padding:24px 16px}.stats{gap:8px}.stat{padding:14px}.stat strong{font-size:24px}header span{max-width:180px}.panel{padding:17px}}@media(prefers-reduced-motion:no-preference){.panel,.stat{animation:rise .35s ease both}@keyframes rise{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}}

.panel{margin-bottom:24px}textarea{width:100%;font:inherit;padding:12px}#preview img{max-width:100%;max-height:480px}#preview iframe{width:100%;height:450px;border:0}#message{color:#9b482d} [hidden]{display:none!important}.stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}.stat strong{font-size:26px}aside.panel{align-self:start}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0 4px}.tabs button{background:#e6e9df;color:var(--ink);padding:10px 18px;border-radius:999px}.tabs button[aria-pressed=true]{background:var(--ink);color:#fff}.tabs small{opacity:.7;margin-inline-start:6px}.viewtabs{display:flex;gap:0;margin:18px 0 0;border-bottom:2px solid var(--line)}.viewtabs button{background:none;color:var(--ink);border-radius:0;padding:12px 22px;border-bottom:3px solid transparent;margin-bottom:-2px;font-weight:600}.viewtabs button[aria-pressed=true]{border-bottom-color:var(--orange)}#invoicesView,#closeView{margin-top:22px}.close-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.close-controls{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}#closeSections h3,#closeView>div>h3{display:flex;justify-content:space-between;gap:12px;margin:26px 0 8px;font-size:17px}#closeSections h3 span{font-weight:600;color:#64766d}#closeSections td input:not([type=checkbox]){min-width:110px}#closeSections td select{width:auto;display:inline-block}.close-unmapped{background:#fdf3ec;border-radius:9px;padding:4px 14px 10px}.unconfirmed{background:#fbf8ee}.unconfirmed input{color:#8a6d2a}.check{display:inline-flex;align-items:center;gap:5px;font-weight:500;margin:0 0 0 10px}.check input{width:auto;margin:0}button.small{padding:6px 10px;font-size:13px;margin-inline-start:6px}button.link{background:none;color:var(--ink);padding:0;text-decoration:underline;font-weight:600}.checks{list-style:none;padding:0;margin:0}.checks li{padding:9px 12px;border-radius:7px;margin-bottom:6px;font-size:14px}.checks .block{background:#f8e1dc;color:#8d2616;font-weight:600}.checks .warn{background:#faf0dc;color:#6e5316}.checks .info{background:#eef1ea}#closeSummary table{white-space:normal}#closeSummary td{padding:8px 6px}dialog#editor{width:min(1500px,98vw)}#editor .edit-grid{grid-template-columns:minmax(0,3fr) minmax(320px,2fr)}#viewer{display:flex;flex-direction:column;background:#f3f3ed;border-radius:9px}#viewer:fullscreen{background:#fff;padding:12px}.viewer-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:8px}.viewer-tools button{padding:6px 12px;font-size:14px}.viewer-tools a{margin-inline-start:auto;font-size:13px;color:var(--ink)}#zoomLevel{min-width:48px;text-align:center;font-size:13px}#preview{height:70vh;overflow:auto;cursor:grab;text-align:center;background:#e9eae3}#viewer:fullscreen #preview{height:calc(100vh - 70px)}#preview.dragging{cursor:grabbing}#preview img{max-width:none;max-height:none;display:inline-block;transform-origin:center}#preview iframe{width:100%;height:100%;border:0}tfoot td{font-weight:700;background:#f7f8f3;border-top:2px solid var(--line)}.chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}.chip{padding:6px 12px;border-radius:999px;font-size:14px;background:#e4efdf;color:#36592b}.chip.missing{background:#f8e1dc;color:#8d2616;font-weight:600}.alert{background:#f8e1dc;color:#8d2616;padding:10px 14px;border-radius:8px;font-weight:600;margin:8px 0}@media(max-width:900px){#editor .edit-grid{grid-template-columns:1fr}#preview{height:55vh}}body.cap main{max-width:560px;padding:18px 16px 40px}body.cap header{padding:16px}body.cap header b{font-size:20px}.cap-shoot,.cap-secondary{display:flex;align-items:center;justify-content:center;border-radius:14px;cursor:pointer;margin:12px 0;font-weight:700;text-align:center}.cap-shoot{background:var(--ink);color:#fff;font-size:24px;min-height:34vh}.cap-shoot.small{font-size:16px;min-height:0;padding:16px;margin:0}.cap-secondary{background:#e6e9df;color:var(--ink);padding:16px;font-size:16px}.cap-shoot input,.cap-secondary input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.cap-pages{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px}.cap-pages img{height:180px;border-radius:8px;border:1px solid var(--line)}.cap-actions{display:grid;gap:10px;margin-top:14px}.cap-actions button{padding:16px;font-size:17px}.cap-queue{list-style:none;padding:0;margin:0}.cap-queue li{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #e9ece5}.cap-queue li>span:first-child{font-size:20px;width:26px;text-align:center}.cap-queue li>span:nth-child(2){flex:1}.cap-queue li.error{color:#8d2616}.cap-queue li.duplicate{color:#805619}.cap-queue small{color:#64766d}.cap-queue li.error small{color:#8d2616}#capMessage{color:#9b482d;font-weight:600}#acctView{margin-top:22px}.acct-settings{background:#f7f8f3;border-radius:9px;padding:6px 16px 14px;margin-bottom:16px}.acct-table td{padding:8px 6px;vertical-align:top}.acct-table input{min-width:80px;width:100%;padding:7px}.acct-table input.wide{min-width:190px}.acct-table tr.exported{background:#f2f6ef;color:#5b6f63}.acct-table tr.incomplete td:last-child{min-width:150px;white-space:normal}.acct-table .ok{color:#36592b;font-weight:700}.acct-table .error{font-size:13px}.group-row{cursor:pointer;background:#f7f8f3}.group-row:hover{background:#eef1e8}.group-row td{border-bottom:1px solid var(--line)}.toggle{width:28px;height:28px;padding:0;margin-inline-end:10px;border-radius:6px;font-size:18px;line-height:1;background:var(--ink);color:#fff}.group-detail td{background:#fff;font-size:14px}.group-detail td:first-child{padding-inline-start:48px;color:#64766d}dialog.confirm{width:min(440px,92vw);padding:24px}dialog.confirm p{font-size:17px;line-height:1.6;margin:0 0 8px}button.danger{background:#a33020;color:#fff}.danger-text{color:#a33020}.gmail-search{align-items:end;margin-top:8px}#mailItems button.saved{opacity:.65}#rows td,#rowsTotal td{white-space:nowrap}
.chip-x,.mail-x{border:0;background:none;color:inherit;padding:0 0 0 2px;margin-inline-start:6px;font-size:16px;line-height:1;cursor:pointer;opacity:.6}.chip-x:hover,.mail-x:hover{opacity:1}
.mail-item{display:inline-flex;align-items:center;gap:2px}.mail-item.hidden-item>button:first-child{opacity:.45}#expectedAddRow{align-items:center}#expectedNew{width:auto;flex:0 1 320px;min-width:200px}
