:root{font-family:Inter,PingFang SC,Microsoft YaHei,sans-serif;color:#21302b;background:#f7f9f7;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:#25735d;text-decoration:none}a:hover{text-decoration:underline}.app{display:flex;min-height:100vh}.sidebar{width:220px;flex:none;background:#163e35;color:#d6e9e1;display:flex;flex-direction:column;padding:24px 12px}.brand{display:flex;align-items:center;gap:12px;padding:0 12px 26px;border-bottom:1px solid #ffffff22}.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:8px;background:#dceadf;color:#236349;font-weight:800;font-size:22px}.brand strong{display:block;color:#fff;font-size:17px}.brand small{display:block;font-size:11px;color:#9abdb0;margin-top:3px}.sidebar nav{display:grid;gap:5px;padding-top:25px}.sidebar button{border:0;background:transparent;color:#c6ddd3;display:flex;align-items:center;gap:13px;width:100%;padding:12px 14px;text-align:left;border-radius:6px;font-size:14px}.sidebar button:hover,.sidebar button.active{background:#ffffff20;color:#fff}.sidebar button.active{box-shadow:inset 3px 0 #91d0ab}.logout{margin-top:auto}.workspace{min-width:0;flex:1}.topbar{height:64px;border-bottom:1px solid #e6ece8;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 36px}.topbar>div{display:flex;align-items:center;gap:9px;font-size:13px}.breadcrumb{color:#8c9a94}.topbar strong{font-size:13px}.status{font-size:12px;color:#71877b;display:flex;align-items:center;gap:7px}.status i{width:7px;height:7px;background:#40ad7f;border-radius:50%}.content{max-width:1320px;margin:auto;padding:34px 36px 80px}.page-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:26px}.page-heading h1{font-size:25px;line-height:1.25;margin:0 0 7px;font-weight:700}.page-heading p{font-size:13px;color:#7b8d84;margin:0}.primary{border:0;border-radius:6px;background:#2d785e;color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 16px;font-weight:600;font-size:13px;white-space:nowrap}.primary:hover{background:#25664f}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:28px}.metric{background:#fff;border:1px solid #e5ebe6;border-radius:7px;padding:22px;display:flex;justify-content:space-between;align-items:flex-start;min-height:112px}.metric span{display:block;color:#7e8d83;font-size:12px;margin-bottom:13px}.metric strong{font-size:24px;font-weight:700;white-space:nowrap}.metric svg{color:#64a084}.section{margin-top:28px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:13px}.section-title h2{font-size:16px;margin:0}.text-button{border:0;background:none;color:#28765d;display:inline-flex;align-items:center;gap:4px;font-weight:600;font-size:12px;padding:4px}.text-button:hover{text-decoration:underline}.table-wrap{background:#fff;border:1px solid #e6ece7;border-radius:7px;overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px;min-width:650px}th{background:#fbfcfb;color:#87978e;font-weight:600;font-size:11px;padding:15px 19px;white-space:nowrap;border-bottom:1px solid #edf0ed}td{padding:16px 19px;border-bottom:1px solid #f0f2f0;color:#5e7065}tbody tr:last-child td{border-bottom:0}.strong{font-weight:650;color:#22382c}.right{text-align:right}.clickable{cursor:pointer}.clickable:hover{background:#f5faf6}.profit{color:#318464;font-weight:700}.empty{padding:36px 16px;text-align:center;color:#9aa9a0;font-size:13px}.stock-list{background:#fff;border:1px solid #e6ece7;border-radius:7px}.stock-list button{display:flex;width:100%;align-items:center;justify-content:space-between;background:none;border:0;padding:15px 18px;border-bottom:1px solid #edf1ed;text-align:left}.stock-list button:last-child{border-bottom:0}.stock-list button:hover{background:#f6faf7}.stock-list b{font-size:13px}.danger{color:#c4514d}.warning{color:#b77925}.toolbar{width:280px;height:38px;background:#fff;border:1px solid #dde7df;border-radius:5px;display:flex;align-items:center;gap:9px;padding:0 11px;margin-bottom:16px;color:#8ba092}.toolbar input{border:0;outline:0;width:100%;font-size:13px}.badge{display:inline-block;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:600}.badge.green{background:#e4f5ec;color:#27785b}.badge.amber{background:#fff2d8;color:#a87825}.overlay,.drawer-backdrop{position:fixed;inset:0;background:#10291f86;display:flex;align-items:center;justify-content:center;z-index:10;padding:20px}.dialog{background:#fff;border-radius:8px;width:min(760px,100%);max-height:min(88vh,900px);overflow:auto;box-shadow:0 20px 60px #10291f30}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:21px 26px;border-bottom:1px solid #e7eee8}.dialog-head h2{font-size:18px;margin:0}.icon-button{border:0;background:transparent;color:#7a8d80;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:4px}.icon-button:hover{background:#edf4ef}.form-body{padding:25px 26px}.form-body label,.login-panel label{display:grid;gap:7px;font-size:12px;font-weight:650;color:#52665b;margin-bottom:18px}.form-body input,.form-body select,.form-body textarea,.login-panel input{border:1px solid #d9e4dc;border-radius:5px;padding:10px 11px;outline:0;min-width:0;background:#fff;color:#20332a;font-size:13px}.form-body input:focus,.form-body select:focus,.login-panel input:focus{border-color:#55a27b;box-shadow:0 0 0 3px #55a27b1d}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.form-grid label{min-width:0}.form-footer{display:flex;justify-content:flex-end;border-top:1px solid #e8eee9;padding-top:19px;margin-top:24px}.form-footer .primary{min-width:135px}.error{color:#ae3331;background:#fff0ee;padding:10px 12px;border-radius:5px;font-size:12px;margin:12px 0}.inline-add{border:0;background:none;color:#2e8060;padding:4px 0;text-align:left;font-size:12px;font-weight:600}.items-head{display:flex;justify-content:space-between;align-items:center;margin:13px 0}.items-head h3{font-size:14px;margin:0}.line-item{display:grid;grid-template-columns:22px minmax(150px,1.4fr) minmax(80px,.65fr) minmax(120px,1fr) 28px;gap:10px;align-items:start}.line-item label{margin-bottom:13px}.line-number{color:#91a096;padding-top:32px;font-size:12px}.line-item .remove{margin-top:27px}.form-summary{display:flex;justify-content:space-between;background:#f5f8f5;padding:13px 15px;border-radius:5px;margin-top:17px;font-size:13px}.form-summary strong{font-size:16px;color:#247657}.hint{font-size:12px;color:#86958a;line-height:1.6}.upload-zone{border:1px dashed #9fc4ad;border-radius:6px;min-height:175px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:9px!important;cursor:pointer;color:#2d795d!important;margin-bottom:10px!important}.upload-zone span{font-size:11px;color:#8d9e92;font-weight:400}.upload-zone input{display:none}.ocr-panel{background:#f7f9f7;border:1px solid #e4ebe5;padding:12px;border-radius:5px;margin-bottom:20px}.ocr-panel>div{display:flex;justify-content:space-between;gap:12px;font-size:12px}.ocr-panel textarea{width:100%;height:95px;margin-top:10px;resize:vertical;font-size:11px;line-height:1.5}.drawer-backdrop{justify-content:flex-end;padding:0}.drawer{background:#fff;width:min(510px,100%);height:100%;overflow:auto;box-shadow:-12px 0 40px #10291f22}.detail-body{padding:24px 26px}.detail-intro{color:#6f8175;font-size:13px;margin:0 0 22px}.history-row,.ledger-row{padding:16px 0;border-bottom:1px solid #e8eee9;font-size:13px;line-height:1.8}.history-top,.history-bottom,.ledger-row>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.history-top span,.ledger-row span{font-size:11px;color:#93a096}.history-row>div:nth-child(2){color:#718276}.history-bottom b,.ledger-row b{color:#28775d}.delta{font-size:11px;color:#ad7841}.ledger-row small{display:block;color:#8d9c90;margin-top:4px;line-height:1.5}.toast{position:fixed;bottom:22px;right:22px;background:#963c37;color:#fff;border-radius:5px;padding:12px 15px;display:flex;gap:12px;align-items:center;z-index:20}.login-page{min-height:100vh;display:grid;place-items:center;background:#edf4ef}.login-panel{width:min(390px,calc(100vw - 36px));background:#fff;border:1px solid #dfe9e1;border-radius:8px;padding:37px;box-shadow:0 12px 35px #1d4e3420}.login-panel .brand-mark{margin-bottom:25px}.login-panel h1{font-size:25px;margin:0 0 5px}.login-panel p{color:#8a9b8e;font-size:13px;margin:0 0 33px}.login-panel .primary{width:100%;margin-top:6px}.center{display:grid;place-items:center;min-height:100vh;color:#6d8274}@media(max-width:900px){.sidebar{width:70px;padding:20px 8px}.brand{padding:0 7px 25px}.brand>div:last-child{display:none}.sidebar nav button,.logout{justify-content:center;padding:12px 0;font-size:0!important}.sidebar button svg{flex:none}.sidebar nav button.active{font-size:0}.metrics{grid-template-columns:repeat(2,1fr)}.content{padding:26px 22px}.topbar{padding:0 22px}}.dialog-actions{display:flex;align-items:center;gap:8px}.detail-body h3{font-size:14px;margin:28px 0 4px}.refund-button{border:1px solid #d8a3a0;background:#fff;color:#a5413d;border-radius:5px;height:30px;padding:0 9px;display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650}.refund-button:hover{background:#fff3f2}.badge.refunded{background:#f2e8e7;color:#9a4945}.detail-intro .badge{margin-left:10px}.sale-detail-summary{display:flex;align-items:center;justify-content:space-between;gap:18px;color:#6f8175;font-size:13px;margin-bottom:14px}.sale-detail-summary p{margin:0}.sale-detail-summary strong{color:#253a30}.sale-detail-summary .badge{margin-left:10px}@media(max-width:620px){.app{display:block}.sidebar{position:fixed;bottom:0;left:0;width:100%;height:58px;padding:0;z-index:5}.sidebar .brand,.sidebar .logout{display:none}.sidebar nav{display:flex;justify-content:space-around;padding:0;height:100%;gap:0}.sidebar nav button{width:auto;flex:1;display:flex;flex-direction:column;gap:2px;font-size:10px!important;padding:6px 0}.sidebar nav button svg{width:18px;height:18px}.sidebar nav button.active{box-shadow:inset 0 3px #91d0ab;font-size:10px!important}.topbar{height:53px;padding:0 16px}.content{padding:24px 15px 90px}.page-heading h1{font-size:21px}.page-heading p{font-size:11px}.primary{padding:10px 11px}.metrics{gap:9px}.metric{min-height:92px;padding:13px}.metric strong{font-size:17px}.metric svg{width:17px}.toolbar{width:100%}.form-grid{grid-template-columns:1fr;gap:0}.dialog{max-height:92vh}.dialog-head,.form-body{padding-left:16px;padding-right:16px}.line-item{grid-template-columns:18px 1fr 68px 88px 24px;gap:4px}.line-item input,.line-item select{padding:8px 3px;font-size:11px}.line-item label{font-size:10px}.status{display:none}}.paste-zone{border:1px dashed #8db9a0;border-radius:6px;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#2d795d;background:#f8fbf9;cursor:pointer;margin-bottom:20px;outline:0}.paste-zone:hover,.paste-zone:focus{border-color:#3d8968;background:#f1f7f3;box-shadow:0 0 0 3px #55a27b1d}.paste-zone.busy{cursor:wait;opacity:.65}.paste-zone span{font-size:11px;color:#82958a}.paste-zone input{display:none}.customer-picker{position:relative;align-self:start}.customer-input{position:relative}.customer-input input{width:100%;padding-right:82px}.customer-add{position:absolute;right:5px;top:5px;height:30px;border:0;border-radius:4px;background:#e7f3eb;color:#28765d;display:flex;align-items:center;gap:3px;padding:0 9px;font-size:11px;font-weight:700}.customer-add:hover{background:#d9ebdf}.customer-matches{position:absolute;z-index:4;top:66px;left:0;right:0;background:#fff;border:1px solid #d9e4dc;border-radius:5px;box-shadow:0 10px 24px #183d2d1c;max-height:220px;overflow:auto}.customer-matches button{border:0;border-bottom:1px solid #edf1ed;background:#fff;width:100%;padding:10px 11px;text-align:left;display:flex;justify-content:space-between;gap:10px;color:#2b4035}.customer-matches button:last-child{border-bottom:0}.customer-matches button:hover{background:#f3f8f4}.customer-matches span{color:#8b9b91;font-size:11px}.field-error{color:#ae3331;font-size:11px;font-weight:500}.product-picker{position:relative;min-width:0;align-self:start}.field-label{display:block;font-size:12px;font-weight:650;color:#52665b;margin-bottom:7px}.product-input{position:relative}.product-input input{width:100%;padding-right:76px}.product-add{position:absolute;right:5px;top:5px;height:30px;border:0;border-radius:4px;background:#e7f3eb;color:#28765d;display:flex;align-items:center;gap:3px;padding:0 9px;font-size:11px;font-weight:700}.product-matches,.product-create{position:absolute;z-index:6;top:66px;left:0;width:max(100%,360px);background:#fff;border:1px solid #d9e4dc;border-radius:5px;box-shadow:0 12px 28px #183d2d26}.product-matches{max-height:260px;overflow:auto}.product-matches button{border:0;border-bottom:1px solid #edf1ed;background:#fff;width:100%;padding:10px 11px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#2b4035}.product-matches button:last-child{border-bottom:0}.product-matches button:hover{background:#f3f8f4}.product-matches button>span{display:grid;min-width:0}.product-matches small{font-size:11px;color:#72867a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-matches em{font-style:normal;color:#82958a;font-size:11px;white-space:nowrap}.product-create{padding:14px;display:grid;gap:10px}.product-create>strong{font-size:12px}.product-create input{width:100%}.product-create>div:not(.product-create-actions){display:grid;grid-template-columns:1fr 1fr;gap:8px}.product-create-actions{display:flex;justify-content:flex-end;gap:8px}.product-create-actions button{border:0;border-radius:5px;padding:8px 11px;font-size:11px}.product-create-actions button:not(.primary){background:#edf2ee;color:#52665b}.product-create-actions .primary{background:#2d785e;color:#fff}.sale-line{position:relative}.toast.notice{background:#9a6824;max-width:min(620px,calc(100vw - 44px));line-height:1.5}.cost-warning{color:#a66a1d!important;font-weight:650}.sales-heading .heading-search{margin:0}.sales-controls{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.sales-date-filter{min-height:38px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#64756c;font-size:13px}.sales-date-filter>span{font-weight:700;color:#52655b;white-space:nowrap}.period-options{display:flex;align-items:center;gap:3px}.period-options button{height:34px;border:1px solid transparent;border-radius:5px;background:transparent;color:#65766d;padding:0 10px;font-weight:600;white-space:nowrap}.period-options button:hover{background:#eef4f0;color:#2d785e}.period-options button.active{border-color:#3c9270;background:#f2faf5;color:#28765d}.date-range{display:flex;align-items:center;gap:7px}.date-range input{height:34px;width:132px;border:1px solid #d9e4dc;border-radius:5px;padding:0 8px;color:#40564a;background:#fff}.date-range i{font-style:normal;color:#94a299;font-size:11px}.payment-switch{position:relative;width:96px;height:30px;border:0;border-radius:15px;padding:0 9px;background:#edf0ee;color:#758078;font-size:11px;font-weight:700;transition:background .18s,color .18s}.payment-switch i{position:absolute;left:4px;top:4px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #183d2d2b;transition:left .18s}.payment-switch span{display:block;margin-left:20px;white-space:nowrap}.payment-switch.received{background:#dcefe5;color:#256f54}.payment-switch.received i{left:70px}.payment-switch.received span{margin-left:0;margin-right:20px}.payment-switch:hover{filter:brightness(.97)}@media(max-width:780px){.sales-heading{align-items:flex-start;flex-direction:column}.sales-heading .heading-search{width:100%}.sales-controls{align-items:flex-end;flex-direction:column}.sales-date-filter{width:100%}.period-options{width:100%;overflow-x:auto;padding-bottom:3px}.sales-controls>.primary{align-self:flex-end}.date-range{width:100%}.date-range input{min-width:0;flex:1}}.recognized-name{font-size:11px;color:#678374;margin:7px 0 3px 32px}.ocr-panel small{display:block;margin-top:5px;color:#6b8575;font-size:11px}@media(max-width:600px){.purchase-line{grid-template-columns:18px minmax(0,1fr) minmax(0,1fr) 26px}.purchase-line .product-picker{grid-column:2 / 4}.purchase-line .line-number{grid-row:1}.purchase-line>.remove{grid-column:4;grid-row:1}.purchase-line>label:nth-of-type(1){grid-column:2}.purchase-line>label:nth-of-type(2){grid-column:3}.purchase-line .product-matches,.purchase-line .product-create{width:100%}.purchase-line .product-matches strong,.purchase-line .product-matches small{white-space:normal;overflow-wrap:anywhere}}.autofill-username{position:absolute;width:1px!important;height:1px!important;opacity:0;padding:0!important;pointer-events:none}.captcha-row{display:grid;grid-template-columns:minmax(0,1fr) 144px;gap:10px;align-items:center}.captcha-row input{min-width:0;width:100%}.captcha-image{width:144px;height:45px;padding:0;border:1px solid #d9e4dc;border-radius:4px;overflow:hidden;background:#edf5f0;cursor:pointer}.captcha-image img{display:block;width:100%;height:100%;object-fit:contain}.captcha-image:disabled{cursor:wait}.delete-product{display:inline-flex;align-items:center;gap:6px;margin-right:auto;border:1px solid #e1b9b9;background:#fff;color:#a52e36;border-radius:5px;padding:10px 14px;font-weight:600;cursor:pointer}.delete-product:hover{background:#fff1f1}.delete-product:disabled{opacity:.5;cursor:wait}.product-image-column{width:76px}.product-thumbnail{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#f3f5f4;color:#96a29c;border-radius:4px;overflow:hidden}.product-thumbnail img{width:100%;height:100%;object-fit:contain}.product-image-editor{display:grid;gap:10px;min-width:0;margin-bottom:20px}.product-image-controls{display:flex;align-items:center;gap:12px}.product-image-picker{width:160px;height:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:1px dashed #9aafa3;border-radius:4px;background:#f7faf8;color:#31765d;overflow:hidden}.product-image-picker img{width:110px;height:105px;object-fit:contain}.product-image-picker span{font-size:13px}.product-image-controls input[hidden]{display:none}.selected-product-chinese{font-size:12px;line-height:1.5;color:#52665b;margin-top:6px;overflow-wrap:anywhere}.dialog.sale-form-dialog,.dialog.sale-detail-dialog{width:min(1180px,100%)}.sale-line-amount{min-width:0;margin-bottom:13px}.sale-line-amount .field-label{text-align:right}.sale-line-amount output{display:flex;align-items:center;justify-content:flex-end;min-height:40px;padding:10px 0;font-size:13px;font-weight:650;color:#247657;overflow-wrap:anywhere}@media(max-width:780px){.line-item.sales-entry{grid-template-columns:18px repeat(3,minmax(0,1fr)) 24px;gap:6px;margin-bottom:12px}.sales-entry .sale-product{grid-column:2 / 5}.sales-entry .line-number{grid-row:1}.sales-entry>.remove{grid-column:5;grid-row:1}.sales-entry>label:nth-of-type(1){grid-column:2}.sales-entry>label:nth-of-type(2){grid-column:3}.sales-entry .sale-line-amount{grid-column:4}.sales-entry .sale-line-amount .field-label{font-size:10px}.sales-entry .sale-line-amount output{min-height:32px;font-size:12px;padding:8px 0}.sales-entry .product-matches,.sales-entry .product-create{width:100%}.sales-entry .product-matches strong,.sales-entry .product-matches small{white-space:normal;overflow-wrap:anywhere}}.sale-product{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px;min-width:0}.sale-product .sale-product-thumbnail{width:40px;height:40px;margin-top:23px}.sale-detail-dialog .dialog-head{gap:12px;flex-wrap:wrap}.sale-detail-dialog .dialog-head h2{overflow-wrap:anywhere;min-width:0}.sale-detail-dialog .dialog-actions{margin-left:auto;flex-shrink:0}.sale-detail-dialog .sale-detail-summary{flex-wrap:wrap}.sale-detail-dialog .ledger-row>div:first-child{flex-wrap:wrap}.sale-detail-dialog .ledger-row strong{overflow-wrap:anywhere;min-width:0}.sale-detail-product-name,.sale-detail-value{display:block;padding:10px 0;min-height:40px;font-size:13px;font-weight:400;color:#20332a;overflow-wrap:anywhere}.sale-detail-body .sales-entry{margin-bottom:14px}@media(max-width:620px){.sale-detail-product-name,.sale-detail-value{padding:8px 0;min-height:32px;font-size:11px}}.payment-options{display:flex;justify-content:flex-end;gap:14px;white-space:nowrap}.payment-options label{display:inline-flex;align-items:center;gap:5px;cursor:pointer;font-size:12px}.payment-options input{width:16px;height:16px;margin:0;accent-color:#2d785e;cursor:pointer}.payment-options input:disabled{cursor:wait}.product-combined-name{overflow-wrap:anywhere}.product-name-edit{display:inline;max-width:100%;padding:2px 0;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer;overflow-wrap:anywhere}.product-name-edit:hover{color:#28765d;text-decoration:underline;text-underline-offset:2px}.product-name-edit:focus-visible{outline:2px solid #2d785e;outline-offset:2px}.product-inline-chinese{font-weight:400;color:#5e7065}.purchase-price-field{min-width:0;margin-bottom:18px}.purchase-price-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}.form-body .purchase-price-heading label{margin:0}.purchase-price-heading .text-button{padding:0;font-size:11px}.purchase-price-field>input{width:100%}.price-history{margin:0 0 18px;font-size:12px;color:#52665b}.price-history-scroll{overflow:auto;max-height:240px}.price-history table{min-width:0;font-size:12px}.price-history th,.price-history td{padding:10px 8px}.price-history td{white-space:nowrap}.sales-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}.export-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #ccdcd2;border-radius:5px;padding:10px 14px;background:#fff;color:#286c55;font-size:13px;font-weight:600;white-space:nowrap}.export-button:hover{background:#f0f6f2}.sale-payment{display:grid;grid-template-columns:minmax(140px,180px) minmax(120px,1fr) auto minmax(80px,auto);gap:12px 24px;align-items:center;margin-top:14px;padding-top:14px;border-top:1px solid #e8eee9}.sale-payment>div{min-width:0}.form-body .sale-payment label{margin:0}.sale-payment input[type=text]{width:100%;font-variant-numeric:tabular-nums}.sale-payment input[aria-invalid=true]{border-color:#c4514d}.sale-payment output{display:block;font-size:13px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.sale-payment .sale-payment-due output{font-size:20px;font-weight:700}.sale-payment-due.outstanding output{color:#b65b32}.sale-payment-due.settled output{color:#247657}.form-body .sale-payment-check{display:flex;align-items:center;gap:7px;cursor:pointer;white-space:nowrap}.sale-payment-check input{width:16px;height:16px;margin:0;padding:0;accent-color:#2d785e;flex:none}.sale-payment-status{justify-self:end}.sale-payment .badge{display:inline-block;font-size:12px}.sale-payment .badge.unpaid{color:#6f8175;background:#f0f3f1}.sale-payment>.field-error{grid-column:1 / -1}.sale-payment.readonly{grid-template-columns:minmax(120px,180px) minmax(120px,1fr) auto}@media(max-width:780px){.sale-payment{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.sale-payment.readonly{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-payment-due{text-align:right}.sale-payment.readonly .sale-payment-status{justify-self:start}}.sale-list-payment{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-height:28px}.sale-list-payment .badge{min-width:66px;text-align:center;white-space:nowrap}.sale-list-payment .badge.unpaid{color:#6f8175;background:#f0f3f1}.sale-list-payment .payment-status-toggle{border:1px solid transparent;width:80px;min-height:30px;flex:none}.sale-list-payment .payment-status-toggle:hover:not(:disabled){border-color:currentColor}.sale-list-payment .payment-status-toggle:focus-visible{outline:2px solid #2d785e;outline-offset:2px}.sale-list-payment .payment-status-toggle:disabled{cursor:default}.sale-list-payment .payment-status-toggle[aria-busy=true]{cursor:wait}.order-number-copy{display:inline-flex;align-items:center;gap:6px;border:0;background:none;padding:4px 0;color:inherit;font-weight:inherit;text-align:left;white-space:nowrap}.order-number-copy:hover{color:#28765d;text-decoration:underline}.order-number-copy:focus-visible{outline:2px solid #2d785e;outline-offset:3px;border-radius:2px}.order-number-copy svg{visibility:hidden;flex:none;color:#28765d}.order-number-copy svg.copied{visibility:visible}.order-number-cell .field-error{display:block;max-width:160px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.quote-page-actions{display:flex;align-items:center;gap:9px}.product-select,.quote-select{width:42px;text-align:center!important;padding-left:12px!important;padding-right:8px!important}.product-select input,.quote-select input{width:16px;height:16px;margin:0;accent-color:#2d785e}.products-table{min-width:820px}.quotes-table{min-width:980px}.quote-overlay{z-index:13}.quote-editor,.quote-detail-dialog,.quote-conversion{width:min(1080px,100%);max-height:94vh}.quote-editor-body,.quote-detail-body{padding:20px 22px;overflow:auto}.quote-fields{display:grid;grid-template-columns:180px 180px minmax(240px,1fr);gap:15px}.quote-fields label{display:grid;gap:6px;margin:0;color:#52665b;font-size:11px;font-weight:650}.quote-fields input,.quote-edit-line input,.quote-edit-line select,.quote-convert-line input{min-width:0;border:1px solid #d7e2da;border-radius:4px;background:#fff;color:#21342a;padding:8px 9px;font-size:12px}.quote-items-title{display:flex;align-items:center;justify-content:space-between;margin:20px 0 9px}.quote-items-title h3{margin:0;font-size:13px}.quote-edit-lines,.quote-convert-lines{border-top:1px solid #dfe7e1}.quote-edit-head,.quote-edit-line{display:grid;grid-template-columns:minmax(250px,1fr) 80px 105px 145px 95px 30px;gap:9px;align-items:center}.quote-edit-head,.quote-convert-head{padding:8px;background:#f7f9f7;color:#75867c;font-size:10px;font-weight:700}.quote-edit-head span:nth-child(2),.quote-edit-head span:nth-child(3),.quote-edit-head span:nth-child(5){text-align:right}.quote-edit-line{padding:9px 8px;border-bottom:1px solid #e8eee9;font-size:11px}.quote-edit-line>b{text-align:right;font-variant-numeric:tabular-nums}.quote-product-picker{position:relative;min-width:0}.quote-product-picker>input{width:100%}.quote-product-matches{position:absolute;z-index:5;top:calc(100% + 3px);left:0;right:0;max-height:270px;overflow:auto;background:#fff;border:1px solid #d7e2da;box-shadow:0 8px 20px #173c2d1c}.quote-product-matches button{width:100%;border:0;border-bottom:1px solid #edf1ee;background:#fff;padding:8px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}.quote-product-matches button:hover{background:#f3f8f5}.quote-product-matches span{display:grid;min-width:0}.quote-product-matches strong{font-size:11px;overflow-wrap:anywhere}.quote-product-matches small{color:#86968d;font-size:10px}.quote-product-matches em{font-size:10px;color:#39735d;font-style:normal;white-space:nowrap}.quote-editor-total,.quote-detail-total{display:flex;justify-content:flex-end;align-items:baseline;gap:22px;padding:15px 9px}.quote-editor-total span,.quote-detail-total span{color:#65766d;font-size:11px}.quote-editor-total strong,.quote-detail-total strong{font-size:18px;color:#1f6f52}.quote-footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:13px 22px;border-top:1px solid #e2e9e4;background:#fff}.quote-detail-actions{flex-wrap:wrap}.quote-detail-actions .delete-product{margin-right:auto}.quote-status{display:inline-flex;align-items:center;border-radius:4px;padding:4px 7px;background:#edf1ee;color:#66746d;font-size:10px;font-weight:700;white-space:nowrap}.quote-status.sent{background:#e7f0f6;color:#38657f}.quote-status.accepted{background:#e3f2e9;color:#267359}.quote-status.rejected{background:#f4e7e6;color:#974945}.quote-status.expired{background:#f5eee0;color:#8a642c}.quote-status.converted{background:#e8ecea;color:#3e5f51}.quote-detail-dialog .dialog-head>div{display:flex;align-items:center;gap:10px}.quote-detail-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.quote-detail-meta span{display:block;color:#7b8a81;font-size:10px;margin-bottom:4px}.quote-detail-meta strong{font-size:12px;overflow-wrap:anywhere}.quote-expired-notice{margin-bottom:14px;padding:9px 11px;border-left:3px solid #ae762f;background:#fff7e8;color:#755625;font-size:11px}.quote-detail-items{min-width:0}.quote-conversion-fields{grid-template-columns:200px minmax(260px,1fr)}.quote-convert-head,.quote-convert-line{display:grid;grid-template-columns:minmax(250px,1fr) 95px 90px 110px 100px;gap:10px;align-items:center}.quote-convert-head span:not(:first-child){text-align:right}.quote-convert-line{padding:9px 8px;border-bottom:1px solid #e8eee9;font-size:11px}.quote-convert-line>span,.quote-convert-line>b{text-align:right;font-variant-numeric:tabular-nums}.quote-convert-line.shortage{background:#fff4f2}.quote-expired-confirm{display:flex;align-items:center;gap:8px;margin:14px 0;color:#735423;font-size:11px;font-weight:650}.quote-expired-confirm input{width:16px;height:16px;accent-color:#2d785e}.quote-print-total p{margin:1.5mm 0 0;text-align:right;font-size:7pt;font-weight:400}.quote-label .quote-meta div:nth-child(4){grid-column:1 / -1}.quote-search{margin-bottom:18px}@media(max-width:900px){.quote-fields,.quote-detail-meta{grid-template-columns:1fr 1fr}.quote-edit-head,.quote-edit-line{grid-template-columns:minmax(190px,1fr) 65px 90px 120px 85px 28px}.quote-convert-head,.quote-convert-line{grid-template-columns:minmax(190px,1fr) 75px 75px 90px 85px}}.line-item.sales-entry{grid-template-columns:22px minmax(0,1fr) 92px 120px 120px 28px}.sale-detail-badges{display:flex;align-items:center;gap:7px}.badge.invoice-status.unissued{background:#f0f3f1;color:#66756c}.badge.invoice-status.issued{background:#e3f2e9;color:#267359}.badge.invoice-status.void{background:#f3e7e6;color:#9b4742}button.badge.detail-status-toggle{border:1px solid transparent;appearance:none;line-height:1.2}button.badge.detail-status-toggle:hover:not(:disabled){border-color:currentColor}button.badge.detail-status-toggle:focus-visible{outline:2px solid #2d785e;outline-offset:2px}button.badge.detail-status-toggle:disabled{cursor:not-allowed}button.badge.detail-status-toggle[aria-busy=true]{cursor:wait}.sales-table{min-width:980px}.invoice-select{width:42px;text-align:center;padding-left:12px!important;padding-right:8px!important}.invoice-select input{width:16px;height:16px;margin:0;accent-color:#2d785e}.invoice-list-print{display:inline-flex;align-items:center;gap:5px;border:1px solid #ccdbd2;border-radius:4px;background:#fff;color:#2c7059;padding:6px 8px;font-size:11px;font-weight:650;white-space:nowrap}.invoice-list-print:hover{background:#f0f6f2}.invoice-list-print.issued{color:#23694f}.invoice-list-print.void{color:#994742;border-color:#dfc0bd}.batch-print-button:disabled{cursor:not-allowed}.invoice-settings-overlay{z-index:14}.invoice-settings-dialog{width:min(1040px,100%);max-height:94vh}.invoice-settings-dialog .dialog-head small{display:block;margin-top:4px;color:#718077;font-size:11px}.invoice-settings-loading{padding:42px;text-align:center;color:#708078}.invoice-order-tabs{display:flex;gap:4px;overflow:auto;padding:10px 18px;border-bottom:1px solid #e4ebe6;background:#fafcfa}.invoice-order-tabs button{display:flex;align-items:center;gap:7px;border:1px solid transparent;border-radius:4px;background:transparent;color:#5d6f65;padding:7px 10px;font-size:11px;white-space:nowrap}.invoice-order-tabs button.active{border-color:#78a98f;background:#fff;color:#245f4b}.invoice-dot{width:7px;height:7px;border-radius:50%;background:#a1aaa5}.invoice-dot.issued{background:#2f946c}.invoice-dot.void{background:#ad4c46}.invoice-settings-content{padding:20px 22px;overflow:auto}.invoice-settings-form{min-width:0}.invoice-settings-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:17px}.invoice-settings-summary div{min-width:0}.invoice-settings-summary span{display:block;color:#7b8a81;font-size:10px;margin-bottom:4px}.invoice-settings-summary strong{font-size:12px;overflow-wrap:anywhere}.invoice-snapshot-notice,.invoice-amend-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 12px;margin-bottom:14px;border-left:3px solid #418866;background:#f1f7f3;color:#456256;font-size:11px}.invoice-amend-notice{border-left-color:#b47a30;background:#fff8e9;color:#765727}.invoice-snapshot-notice button,.invoice-amend-notice button{border:0;background:transparent;color:#267259;font-size:11px;font-weight:700;white-space:nowrap}.invoice-amend-notice button{color:#8d6128}.invoice-tax-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:10px}.invoice-tax-tools>span{margin-right:auto;color:#66776d;font-size:11px;font-weight:700}.invoice-tax-tools button{border:1px solid #cbdad1;border-radius:4px;background:#fff;color:#286d55;padding:7px 10px;font-size:11px;font-weight:650}.invoice-tax-tools button:hover{background:#f0f6f2}.invoice-tax-tools button:disabled{cursor:not-allowed}.invoice-setting-lines{border-top:1px solid #dfe7e1}.invoice-setting-head,.invoice-setting-line{display:grid;grid-template-columns:minmax(240px,1fr) 60px 110px 220px;gap:12px;align-items:center}.invoice-setting-head{padding:9px 8px;background:#f7f9f7;color:#7c8b82;font-size:10px;font-weight:700}.invoice-setting-head span:nth-child(2),.invoice-setting-head span:nth-child(3){text-align:right}.invoice-setting-line{padding:10px 8px;border-bottom:1px solid #e9eeea;font-size:11px}.invoice-setting-line>strong{overflow-wrap:anywhere;min-width:0}.invoice-setting-line>span,.invoice-setting-line>b{text-align:right;font-variant-numeric:tabular-nums}.invoice-gst-cell{display:flex;align-items:center;gap:9px;min-width:0}.invoice-gst-check{display:inline-flex!important;grid-template-columns:none!important;align-items:center;gap:6px!important;margin:0!important;color:#315b49!important;font-size:11px!important;white-space:nowrap}.invoice-gst-check input{width:16px;height:16px;margin:0;accent-color:#2d785e}.invoice-gst-cell select{min-width:0;flex:1;border:1px solid #d4dfd7;border-radius:4px;background:#fff;padding:7px 6px;color:#2c4035;font-size:11px}.invoice-gst-cell select:disabled{background:#f1f3f2;color:#758079}.invoice-settings-totals{display:grid;justify-content:end;gap:7px;padding:14px 8px;font-size:11px}.invoice-settings-totals span{display:grid;grid-template-columns:180px 100px;gap:14px;align-items:baseline;color:#637269;text-align:right}.invoice-settings-totals b{color:#283b31}.invoice-settings-totals strong{font-size:15px;color:#1f6f52}.invoice-events{border-top:1px solid #e5ebe7;padding-top:10px;font-size:11px;color:#65766d}.invoice-events summary{cursor:pointer;font-weight:650}.invoice-events div{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f0f2f1}.invoice-settings-error{margin:0 22px 12px}.invoice-settings-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px;border-top:1px solid #e3eae5;background:#fff}.void-invoice-button{margin-right:auto;border:1px solid #d9aaa7;border-radius:5px;background:#fff;color:#a23e3a;padding:9px 12px;font-size:12px;font-weight:650}.void-invoice-button:hover{background:#fff3f2}.invoice-print-page{background:#e8ece9;color:#111}.invoice-preview{min-height:100vh;padding:78px 24px 36px}.invoice-preview-pages{display:grid;gap:24px}.invoice-preview-toolbar{position:fixed;z-index:5;top:0;left:0;right:0;min-height:58px;padding:10px 20px;background:#fff;border-bottom:1px solid #d7ddd9;display:flex;align-items:center;justify-content:space-between;gap:18px}.invoice-preview-toolbar>div:first-child{display:grid;gap:3px}.invoice-preview-actions{display:flex;align-items:center;gap:8px}.invoice-preview-error{width:102mm;margin:0 auto 14px}.invoice-preview-toolbar strong{font-size:14px}.invoice-preview-toolbar span{font-size:11px;color:#66736c}.invoice-label{position:relative;width:102mm;min-height:152mm;margin:0 auto;padding:3mm;background:#fff;color:#000;box-shadow:0 8px 28px #14271e2b;font-family:Arial,Microsoft YaHei,sans-serif;font-size:8.5pt;line-height:1.32;letter-spacing:0;overflow:visible;box-decoration-break:clone;-webkit-box-decoration-break:clone}.invoice-label-head{text-align:center;padding-bottom:2.2mm;border-bottom:.3mm solid #000}.invoice-label-head h1{margin:0;font-size:13pt;line-height:1.2;overflow-wrap:anywhere}.invoice-label-head h2{margin:1.3mm 0 1mm;font-size:11.5pt;line-height:1.2}.invoice-label-head p{margin:.5mm 0;font-size:7.6pt;overflow-wrap:anywhere}.invoice-meta{margin:2.2mm 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1mm 2.5mm}.invoice-meta div{min-width:0}.invoice-meta div:nth-child(4){grid-column:1 / -1}.invoice-meta dt{font-weight:700;font-size:7pt}.invoice-meta dd{margin:.3mm 0 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.invoice-items{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;font-size:8pt}.invoice-items thead{display:table-header-group}.invoice-items th{padding:1.3mm .8mm;background:#fff;color:#000;border-top:.25mm solid #000;border-bottom:.25mm solid #000;font-size:7.2pt}.invoice-items td{padding:1.5mm .8mm;border-bottom:.2mm solid #aaa;color:#000;vertical-align:top;overflow-wrap:anywhere;word-break:break-word}.invoice-items th:first-child,.invoice-items td:first-child{width:54%}.invoice-items th:nth-child(2),.invoice-items td:nth-child(2){width:10%}.invoice-items th:nth-child(3),.invoice-items td:nth-child(3){width:18%}.invoice-items th:nth-child(4),.invoice-items td:nth-child(4){width:18%}.invoice-items td small{display:block;margin-top:.6mm;font-size:6.3pt;color:#333}.invoice-totals{width:59%;margin:2.2mm 0 0 auto;border-top:.3mm solid #000;padding-top:1mm;font-variant-numeric:tabular-nums}.invoice-totals div{display:flex;justify-content:space-between;gap:3mm;padding:.55mm 0}.invoice-totals .invoice-added-tax{font-size:7pt}.invoice-totals .invoice-grand-total{margin-top:.7mm;padding-top:1.2mm;border-top:.25mm solid #000;font-size:10pt}.invoice-refunded{position:absolute;top:48%;left:8%;right:8%;transform:rotate(-24deg);border:1mm solid #000;text-align:center;font-size:28pt;font-weight:800;letter-spacing:0;opacity:.12;z-index:2}.invoice-print-state{min-height:100vh;display:grid;place-items:center;padding:24px}.invoice-items tr,.invoice-totals{break-inside:avoid;page-break-inside:avoid}.invoice-label{break-after:page;page-break-after:always}.invoice-label:last-child{break-after:auto;page-break-after:auto}@media(max-width:900px){.line-item.sales-entry{grid-template-columns:18px repeat(3,minmax(0,1fr)) 24px;gap:6px;margin-bottom:12px}.sales-entry .sale-product{grid-column:2 / 5}.sales-entry .line-number{grid-row:1}.sales-entry>.remove{grid-column:5;grid-row:1}.sales-entry>label:nth-of-type(1){grid-column:2}.sales-entry>label:nth-of-type(2){grid-column:3}.sales-entry .sale-line-amount{grid-column:4}.invoice-settings-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-setting-head,.invoice-setting-line{grid-template-columns:minmax(160px,1fr) 48px 90px 180px}.invoice-gst-cell{align-items:flex-start;flex-direction:column}}@page{size:102mm 152mm;margin:0}@media print{html,body,#root{width:102mm!important;min-width:102mm!important;margin:0!important;padding:0!important;background:#fff!important}.invoice-preview{padding:0!important;min-height:0}.invoice-preview-pages{display:block!important}.invoice-preview-toolbar{display:none!important}.invoice-label{width:102mm!important;min-height:152mm!important;margin:0!important;padding:3mm!important;box-shadow:none!important}}.delete-sale-button{display:inline-flex;align-items:center;gap:5px;border:1px solid #d9aaa7;border-radius:4px;background:#fff;color:#a23e3a;padding:7px 9px;font-size:11px;font-weight:650}.delete-sale-button:hover{background:#fff3f2}.delete-sale-button:disabled{opacity:.55;cursor:not-allowed}
