: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}.line-item.sales-entry{grid-template-columns:22px minmax(150px,1.7fr) minmax(60px,.55fr) minmax(85px,.8fr) minmax(92px,.85fr) 28px}.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:620px){.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}}
