:root{--bg:#f6f7f5;--surface:#fff;--ink:#252d29;--muted:#778078;--line:#e4e8e2;--green:#294a3e;--sage:#eef3ed;--amber:#986514;--red:#aa453f;--radius:12px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,.button{border:1px solid var(--line);background:white;color:var(--ink);border-radius:8px;padding:10px 15px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:550;line-height:1.4}button:hover,.button:hover{background:#f0f3ef;border-color:#c6cfc5}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#1b392e;color:#fff;border-color:#1b392e}.danger{color:var(--red)}.small{padding:6px 10px;font-size:12px}.ghost{background:transparent;border-color:transparent}.icon-button{width:38px;height:38px;padding:8px}.link{color:var(--green);font-weight:600;text-decoration:underline;text-underline-offset:3px}.muted{color:var(--muted);line-height:1.6}.caption{color:var(--muted);font-size:12px;line-height:1.65}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:650;color:var(--muted);display:block}.stack{display:grid;gap:18px}.row{display:flex;align-items:center;gap:10px}.wrap{flex-wrap:wrap}.between{justify-content:space-between}h1,h2,h3,p{margin-top:0}h1{font-size:30px;letter-spacing:-1px;font-weight:600;line-height:1.25;margin-bottom:8px}h2{font-size:19px;letter-spacing:-.4px;font-weight:600;margin-bottom:8px}h3{font-size:15px;font-weight:600}label{display:grid;gap:7px;font-size:12px;font-weight:600;color:#515a52}input,select,textarea{border:1px solid #dce2da;border-radius:7px;background:white;color:var(--ink);padding:10px 11px;width:100%;min-width:0;outline:none;line-height:1.4}input:focus,select:focus,textarea:focus{border-color:#608a71;box-shadow:0 0 0 3px #e9f1e8}textarea{resize:vertical;min-height:85px}:focus-visible{outline:2px solid #527f65;outline-offset:3px}input[type=checkbox]{width:17px;height:17px;accent-color:var(--green);margin:0}.check-label{display:flex;align-items:flex-start;gap:9px;font-weight:450;line-height:1.5}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.brand{display:flex;align-items:center;gap:10px;font-size:29px;letter-spacing:-1.5px;font-weight:600}.brand-symbol{display:inline-flex;justify-content:center;align-items:center;color:white;background:var(--green);font-size:32px;border-radius:10px;width:35px;height:35px;line-height:1;padding-bottom:5px;letter-spacing:-2px}.brand-dot{color:#a2b498;margin-left:-9px}.app-layout{display:flex;min-height:100vh}.sidebar{width:232px;background:#fdfefd;border-right:1px solid var(--line);position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:29px 19px;z-index:20}.sidebar .brand{padding-left:12px;margin-bottom:35px}.workspace-label{padding:0 12px 25px;display:grid;gap:8px}.workspace-label strong{font-size:12px;font-weight:550;overflow-wrap:anywhere}.nav-group{margin:22px 12px 8px;font-size:9px;letter-spacing:1.3px;color:#96a093;font-weight:650}.nav-item{padding:11px 13px;display:flex;align-items:center;gap:12px;font-size:13px;border-radius:7px;color:#6b756c;margin:3px 0}.nav-item:hover{background:#f3f6f1}.nav-item.active{background:#eaf0e7;color:var(--green);font-weight:600}.nav-icon{width:18px;height:18px;flex-shrink:0;stroke:currentColor;stroke-width:1.65;fill:none}.sidebar-bottom{margin-top:auto;padding-top:30px}.human-note{display:flex;gap:9px;padding:14px 11px;border-bottom:1px solid var(--line);margin-bottom:15px;color:#87917f}.human-note p{font-size:11px;line-height:1.7;margin:0}.human-note span{color:#678360}.user-block{display:flex;width:100%;padding:8px 4px;border:0;background:transparent;text-align:left;justify-content:space-between}.user-block strong{display:block;font-size:12px;max-width:125px;overflow-wrap:anywhere}.user-block small{display:block;font-size:10px;font-weight:400;margin-top:5px;color:var(--muted)}.avatar{width:33px;height:33px;border-radius:50%;background:#eeeadd;display:flex;justify-content:center;align-items:center;font-size:12px;flex-shrink:0}.logout{background:transparent;border:0;color:#868d83;font-size:11px;margin-left:38px;padding:4px}.main-shell{margin-left:232px;flex:1;min-width:0}.topbar{height:78px;background:rgba(255,255,255,.8);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;gap:20px}.breadcrumb{display:flex;gap:14px;font-size:12px;color:var(--muted);align-items:center}.breadcrumb strong{color:#465045;font-weight:500}.company-switch select{width:240px;background:#fff;font-size:12px}.mobile-menu{display:none}#content{max-width:1700px;margin:auto;padding:35px 38px 28px;min-height:calc(100vh - 135px)}.page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:29px}.page-head p{margin:8px 0 0;font-size:13px;color:var(--muted)}.page-head .eyebrow{margin-bottom:11px}.head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.head-actions input{width:auto}.panel{border:1px solid var(--line);background:white;border-radius:var(--radius);overflow:hidden}.panel-pad{padding:24px}.panel-head{padding:21px 24px;border-bottom:1px solid var(--line);display:flex;gap:15px;align-items:center;justify-content:space-between}.panel-head h2,.panel-head h3{margin:0}.panel-head .caption{margin:5px 0 0}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:25px}.stat{background:white;border:1px solid var(--line);border-radius:var(--radius);padding:22px}.stat-label{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;color:#6d786c}.stat-value{font-size:35px;letter-spacing:-1px;line-height:1.4;font-weight:550;margin:12px 0 3px;font-variant-numeric:tabular-nums}.stat .caption{margin:0}.stat.accent{background:#eff4ec;border-color:#dce6d7}.stat.accent .stat-value{color:var(--green)}.stat-icon{width:29px;height:29px;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:center}.dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:22px;margin-bottom:23px}.currency-total{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid var(--line)}.currency-total:last-child{border-bottom:0}.currency-total strong{font-size:26px;font-weight:550;letter-spacing:-.6px;font-variant-numeric:tabular-nums}.currency-total .currency-code{font-size:11px;background:var(--sage);padding:5px 8px;border-radius:5px;color:var(--green)}.split-totals{display:flex;gap:20px;font-size:12px;margin-top:8px;color:#7e8879}.activity-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 23px;border-bottom:1px solid var(--line)}.activity-row:last-child{border-bottom:0}.activity-name{font-size:13px;font-weight:500;display:block;margin-bottom:4px}.mini-doc{width:33px;height:38px;border:1px solid #dfe5db;background:#f8faf7;border-radius:5px;display:flex;align-items:center;justify-content:center;color:#91a28b;flex-shrink:0}.badge{display:inline-flex;white-space:nowrap;font-size:10px;font-weight:550;align-items:center;gap:6px;border-radius:5px;padding:5px 8px;background:#f0f2ef;color:#6f786d}.badge:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor}.badge.validated{background:#edf4ea;color:#517548}.badge.review,.badge.duplicate{background:#fcf4e4;color:#a47c35}.badge.error{background:#fbecea;color:#b0574d}.badge.analyzing{background:#eaf0f6;color:#62829b}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}th{padding:12px 17px;font-size:10px;color:#929a8e;font-weight:550;letter-spacing:.4px;background:#fbfcfa;border-bottom:1px solid var(--line)}td{padding:16px 17px;font-size:12px;border-bottom:1px solid #eef0eb}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcf9}td.amount{text-align:right;font-variant-numeric:tabular-nums}td strong{font-weight:550}td small{font-size:10px;display:block;color:var(--muted);margin-top:5px}.supplier-cell{max-width:220px;white-space:normal;min-width:140px}.document-cell{max-width:200px;overflow:hidden;text-overflow:ellipsis}.table-footer{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:17px;align-items:flex-end}.filters label{flex:1;min-width:130px;font-size:10px;font-weight:500}.filters .search{flex:2;min-width:220px}.filters input,.filters select{font-size:12px;padding:9px}.filters .short{max-width:115px;min-width:100px}.empty{padding:42px 24px;text-align:center;color:#879180;line-height:1.7}.empty h3{color:var(--ink);margin-top:16px}.empty .empty-mark{width:50px;height:54px;border:1px solid var(--line);border-radius:9px;display:grid;place-items:center;margin:auto;background:#f8faf5;font-size:21px}.banner{padding:15px 18px;border:1px solid #e8e1c9;background:#fffbef;border-radius:9px;font-size:12px;line-height:1.65;color:#8c7643;margin-bottom:18px}.banner.info{background:#f0f5ef;border-color:#dfe8db;color:#5b7751}.banner.error{background:#fdf0ee;border-color:#efd8d3;color:var(--red)}.banner ul{margin:6px 0;padding-left:20px}.import-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:24px}.dropzone{display:grid;justify-items:center;align-content:center;min-height:300px;padding:40px 20px;border:1.5px dashed #c4d2bd;background:#fafcf8;border-radius:11px;text-align:center;cursor:pointer}.dropzone.over{background:#eaf3e4;border-color:#638459}.dropzone .upload-mark{border:1px solid #dce5d6;background:white;width:60px;height:60px;display:grid;place-items:center;border-radius:13px;margin-bottom:23px;font-size:27px;color:#718668}.dropzone h2{font-size:17px;margin-bottom:7px}.dropzone p{font-size:12px;color:#8a9483;margin-bottom:22px}.dropzone input{width:auto;max-width:100%;font-size:12px;margin-top:18px}.upload-row{padding:15px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.upload-row span{overflow-wrap:anywhere}.step{display:flex;gap:14px;margin:23px 0}.step-number{width:26px;height:26px;border-radius:50%;background:var(--sage);color:#78906d;display:grid;place-items:center;font-size:11px;flex-shrink:0}.step p{margin:5px 0;font-size:12px;line-height:1.6;color:var(--muted)}.review-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}.document-viewer{position:sticky;top:20px}.document-frame{width:100%;height:calc(100vh - 275px);min-height:510px;border:0;background:#e6e9e3;display:block}.document-image{width:100%;display:block;object-fit:contain;max-height:calc(100vh - 230px);background:#e6e9e3;padding:14px}.review-form{min-width:0}.form-section{padding:22px;border-bottom:1px solid var(--line)}.form-section:last-child{border-bottom:0}.form-section h3{margin:0 0 18px;display:flex;gap:8px;align-items:center}.section-number{font-size:10px;border:1px solid var(--line);padding:4px 6px;border-radius:4px;color:#98a190}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fields .full{grid-column:1/-1}.field-head{display:flex;gap:8px;align-items:center;justify-content:space-between}.field-state{font-size:9px;color:#7c9772;font-weight:450}.field-state.missing{color:#a8afa4}.field-state.uncertain{color:var(--amber)}.uncertain-input{border-color:#cfb275;background:#fffcf2}.totals-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.totals-grid label:last-child input{background:#f2f6ef;border-color:#d7e1cf;font-weight:650}.review-actions{padding:20px;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:10px;background:#fbfcfa}.review-actions .primary{flex:1}.line-editor{overflow-x:auto}.line-editor th,.line-editor td{padding:7px 5px}.line-editor input{font-size:11px;padding:8px;min-width:80px}.line-editor input[name*=description]{min-width:180px}.line-editor button{padding:5px 8px}.row-actions{display:flex;gap:6px}.form-error{font-size:12px;color:var(--red);line-height:1.6}.form-error:empty{display:none}.list-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.company-card{padding:23px}.company-card h2{font-size:17px;margin:17px 0 8px}.company-card .avatar{border-radius:9px;background:var(--sage);color:#658259;width:42px;height:42px;font-size:16px}.company-card .caption{min-height:38px}.company-card footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.app-footer{display:flex;justify-content:space-between;padding:16px 38px;font-size:10px;color:#a0a79a}.loading{padding:70px;text-align:center;color:var(--muted)}dialog{padding:0;border:1px solid #dde3d7;border-radius:14px;width:650px;max-width:calc(100vw - 24px);max-height:90vh;box-shadow:0 20px 80px #23352425;color:var(--ink)}dialog::backdrop{background:#21312750;backdrop-filter:blur(2px)}.modal-head{padding:22px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.modal-head h2{margin:0}.modal-body{padding:24px;max-height:65vh;overflow-y:auto}.modal-footer{padding:18px 24px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}.permissions-row{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.permissions-row .check-label{font-size:11px}.audit-json{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 ui-monospace,monospace;background:#f6f7f4;padding:15px;border-radius:7px;max-height:350px;overflow:auto}.audit-time{font-variant-numeric:tabular-nums;font-size:10px;color:#929a8e}.auth-layout{display:grid;grid-template-columns:1fr 1fr;min-height:100vh;background:#fff}.auth-card{width:430px;max-width:100%;margin:auto;padding:42px 28px}.auth-card .brand{margin-bottom:70px}.auth-card .eyebrow{margin-bottom:15px;font-size:9px}.auth-card h1{font-size:39px;line-height:1.15;margin-bottom:20px;letter-spacing:-1.5px}.auth-card .muted{font-size:13px;margin-bottom:27px}.auth-card .caption{margin-top:24px}.auth-card .primary{justify-content:space-between;padding:12px 16px}.auth-aside{background:#edf1e8;position:relative;display:flex;flex-direction:column;justify-content:center;padding:70px;color:#4c6844;border-left:1px solid #e3e8de}.auth-aside h2{font-size:53px;line-height:1.15;font-weight:450;letter-spacing:-2px;margin:25px 0 40px}.auth-aside .eyebrow{font-size:8px;color:#819276}.sample-slip{background:#fff;border:1px solid #dfe7d7;border-radius:12px;max-width:330px;padding:30px;box-shadow:0 12px 40px #425b3220;transform:rotate(-4deg)}.sample-slip .doc-icon{display:block;font-size:25px;margin-bottom:30px}.sample-slip strong{font-size:19px;line-height:1.5;font-weight:500}.sample-slip p{font-size:11px;letter-spacing:.3px;border-top:1px solid var(--line);padding-top:18px;margin:22px 0 0;color:#98a090}.aside-footer{position:absolute;bottom:35px;left:70px;font-size:10px;color:#91a086}#toast-region{position:fixed;bottom:24px;right:24px;display:grid;gap:10px;z-index:100;max-width:400px}.toast{padding:15px 19px;border:1px solid #dfe7d8;border-radius:9px;background:#fff;color:var(--green);box-shadow:0 5px 30px #203b2817;font-size:13px;line-height:1.5}.toast.error{border-color:#e9c5bf;color:var(--red)}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.setting-line{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.setting-line strong{font-weight:500;text-align:right}.no-margin{margin:0}.mt{margin-top:20px}.mb{margin-bottom:20px}.subtle{color:#929b8c}.tag-count{margin-left:auto;background:white;color:#708565;border-radius:4px;font-size:10px;padding:2px 6px}
@media(min-width:1600px){#content{padding:40px 55px}.sidebar{width:252px}.main-shell{margin-left:252px}.topbar{padding:0 55px}}
@media(max-width:1200px){.stats{grid-template-columns:repeat(2,1fr)}.list-grid{grid-template-columns:repeat(2,1fr)}.sidebar{width:205px;padding:25px 13px}.main-shell{margin-left:205px}#content{padding:28px 24px}.topbar{padding:0 24px}.review-grid{gap:16px;grid-template-columns:.9fr 1.1fr}.form-section{padding:18px}.dashboard-grid{grid-template-columns:1fr}.import-grid{grid-template-columns:1.4fr 1fr}}
@media(max-width:900px){.review-grid{grid-template-columns:1fr}.document-viewer{position:static}.document-frame{height:450px;min-height:0}.document-image{max-height:460px}.settings-grid{grid-template-columns:1fr}.import-grid{grid-template-columns:1fr}.page-head{align-items:flex-start}.auth-aside{padding:35px}.auth-aside h2{font-size:40px}.aside-footer{left:35px}}
@media(max-width:700px){.sidebar{transform:translateX(-100%);transition:transform .15s;width:245px;box-shadow:8px 0 30px #263f3020}.sidebar.open{transform:translateX(0)}.main-shell{margin-left:0}.mobile-menu{display:inline-flex}.topbar{height:65px;padding:0 16px;gap:10px}.breadcrumb{display:none}.company-switch{flex:1}.company-switch select{width:100%;max-width:300px;margin-left:auto}#content{padding:25px 16px 20px}.page-head{display:block;margin-bottom:23px}.head-actions{margin-top:18px}h1{font-size:27px}.stats{gap:10px;margin-bottom:18px}.stat{padding:16px}.stat-value{font-size:28px}.stat-label{font-size:11px}.stat-icon{display:none}.dashboard-grid{gap:17px}.panel-pad,.panel-head{padding:19px}.list-grid{grid-template-columns:1fr}.filters{gap:8px}.filters .search{min-width:100%;flex:1}.filters label{min-width:calc(50% - 8px)}.filters .short{max-width:none;min-width:calc(50% - 8px)}.app-footer{padding:16px}.app-footer span{max-width:230px;text-align:right}.fields{gap:13px}.totals-grid{grid-template-columns:1fr}.review-actions{position:sticky;bottom:0;box-shadow:0 -3px 15px #203b2810;z-index:5}.document-frame{height:340px}.row-actions{flex-wrap:wrap}.permissions-row{grid-template-columns:1fr 1fr}.auth-layout{display:block}.auth-aside{display:none}.auth-card{padding:35px 26px}.auth-card .brand{margin-bottom:65px}.auth-card h1{font-size:37px}.auth-card>.caption{margin-top:30px}#toast-region{left:16px;right:16px;bottom:16px}.dropzone{min-height:270px;padding:30px 12px}.activity-row{padding:14px 17px}.currency-total strong{font-size:22px}.split-totals{gap:12px;font-size:10px}.modal-body{padding:18px}.modal-head,.modal-footer{padding:17px 18px}.review-form .fields .full{grid-column:1/-1}.panel-head h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.invoice-fieldset{border:0;margin:0;padding:0;min-width:0}.invoice-fieldset:disabled input,.invoice-fieldset:disabled select{background:#f6f8f3;color:#74806f}.invoice-fieldset:disabled .field-state{color:#99a291}
.pdf-controls{display:flex;align-items:center;gap:9px;background:#f9fbf7;padding:10px 14px;border-bottom:1px solid var(--line)}.pdf-spacer{flex:1}.pdf-stage{overflow:auto;background:#e6e9e3;padding:15px;height:calc(100vh - 350px);min-height:450px;position:relative}.pdf-stage canvas{display:block;background:white;box-shadow:0 1px 5px #233b2120;max-width:none;margin:auto}.pdf-message{padding:25px;text-align:center}.line-editor input[data-line-field=description]{min-width:170px}.review-actions button{min-width:145px}
@media(max-width:900px){.pdf-stage{height:440px;min-height:0}}
@media(max-width:700px){.pdf-stage{height:340px}.review-actions{flex-direction:column}.review-actions button{width:100%}.sidebar{transition:none}.pdf-controls{padding:9px 10px}}
.close-menu{position:absolute;right:8px;top:12px}
