:root{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;font-size:16px;color:#172b3e;background:#f3f6f9;--blue:#1659b7;--nav:#12283c;--muted:#607486;--line:#dbe3eb;--green:#167552}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;border:1px solid var(--line);border-radius:7px;background:white;padding:10px 16px;color:inherit;font-weight:600}button:hover{background:#edf3fb;border-color:#a0bce0}button:disabled{cursor:wait;opacity:.5}.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.primary:hover{background:#104996;color:white}.danger{color:#b03434}.small{font-size:.875rem;padding:7px 10px}.link{color:var(--blue);border:0;background:transparent;padding:5px}input,select,textarea{border:1px solid #bbcbd9;border-radius:6px;background:white;padding:10px 12px;min-height:44px;max-width:100%;color:#172b3e}input:focus,select:focus,textarea:focus{border-color:var(--blue)}label{display:flex;flex-direction:column;gap:8px;font-weight:600;font-size:.9375rem}small,.muted{color:var(--muted);font-weight:400;font-size:.875rem}h1{font-size:1.8rem;margin:0 0 8px;font-weight:700;letter-spacing:.02em}h2{font-size:1.2rem;margin:0}p{line-height:1.65}a{color:var(--blue)}.shell{display:grid;grid-template-columns:225px 1fr;min-height:100vh}aside{background:var(--nav);color:#d3dfeb;padding:28px 16px;position:fixed;inset:0 auto 0 0;width:225px;display:flex;flex-direction:column}.brand{padding:0 12px 28px;color:white;line-height:1.6;font-size:1.25rem;font-weight:700}.brand small{color:#9fb5ca;display:block;letter-spacing:.12em;font-size:.8125rem}.brandmark{display:inline-grid;place-items:center;width:35px;height:35px;border-radius:9px;background:#3878d6;margin-right:8px}.nav{display:grid;gap:7px}.nav button{text-align:left;background:transparent;border:0;color:#becfde;padding:14px 15px;font-size:1rem;font-weight:500}.nav button.active{background:#25415e;color:#fff;box-shadow:inset 3px 0 #6aa6ff}.nav button:hover{background:#213c54}.navicon{display:inline-block;width:29px}.aside-bottom{margin-top:auto;padding:26px 12px 0;font-size:.875rem;color:#b4c6d7;line-height:1.7}.main{grid-column:2;min-width:0}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;gap:16px}.topbar .identity{display:flex;align-items:center;gap:14px}.dot{width:8px;height:8px;display:inline-block;border-radius:50%;background:#25a572;margin-right:8px}.workspace{padding:30px 32px 48px;max-width:1700px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.heading p{margin:0;color:var(--muted)}.actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.card{background:white;border:1px solid var(--line);border-radius:10px;padding:24px;margin-bottom:20px}.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:14px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:23px}.metric{background:#fff;border:1px solid var(--line);border-radius:9px;padding:21px}.metric .value{font-size:1.9rem;font-weight:700;font-variant-numeric:tabular-nums;margin:12px 0 6px}.metric:first-child{border-top:3px solid var(--blue)}.toolbar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:22px}.toolbar label{min-width:130px}.toolbar .search{flex:1;min-width:220px}.toolbar input[type=search]{width:100%}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:7px}table{border-collapse:collapse;width:100%;font-size:.9375rem;text-align:left}th{background:#f1f5f9;font-size:.875rem;color:#556b7e;font-weight:600;white-space:nowrap;padding:14px 13px}td{padding:13px;border-top:1px solid #e7ecf1;vertical-align:middle;line-height:1.5}tbody tr:hover{background:#f8fbff}.number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.product{display:flex;align-items:center;gap:12px;min-width:160px}.product img{width:50px;height:56px;object-fit:contain;border:1px solid #e6eaf0;border-radius:5px;background:#fff}.product strong{font-size:1rem;display:block}.placeholder{width:50px;height:56px;border:1px dashed #cbd4df;border-radius:5px;display:grid;place-items:center;font-size:.75rem;color:#7c8c9c;flex-shrink:0}.badge{display:inline-block;border-radius:5px;padding:4px 8px;font-size:.8125rem;white-space:nowrap;background:#edf3fa;color:#3f627e}.badge.green{background:#e6f6ef;color:#13613e}.badge.orange{background:#fff1dc;color:#8b5608}.badge.grey{background:#f0f1f3;color:#637080}.warning{padding:14px 18px;border:1px solid #edd3a5;border-radius:7px;background:#fff8ea;color:#865710;font-size:.9375rem;line-height:1.65;margin-bottom:20px}.info{padding:14px 18px;background:#edf4fc;color:#345d87;border-radius:7px;line-height:1.6;margin-bottom:20px}.empty{text-align:center;padding:55px 20px;color:var(--muted)}.empty h2{color:#314b62;margin-bottom:10px}.empty button{margin-top:16px}.pagination{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:18px}.two-col{display:grid;grid-template-columns:1.2fr 1fr;gap:20px}.barrow{display:grid;grid-template-columns:90px 1fr 105px;align-items:center;gap:12px;margin:17px 0;font-size:.875rem}.bartrack{height:12px;border-radius:4px;background:#eef2f7}.barfill{height:100%;border-radius:4px;background:#4a83ce}.barrow .number{font-weight:600}.ranknum{color:var(--muted);font-weight:600}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-brand{background:#12283c;color:white;padding:10vw 6vw;display:flex;flex-direction:column;justify-content:center}.login-brand h1{font-size:2.4rem}.login-brand p{color:#b6cbdf}.login-panel{display:grid;place-items:center;padding:30px}.login form{max-width:420px;width:100%;background:white;border:1px solid var(--line);padding:35px;border-radius:12px;display:grid;gap:22px}.loading{padding:80px;text-align:center}.form-error{color:#b02632;font-size:.9375rem;line-height:1.5}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.span2{grid-column:1/-1}.form-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}dialog{width:min(880px,94vw);max-height:93vh;border:1px solid var(--line);border-radius:12px;padding:28px;color:inherit;box-shadow:0 20px 90px #0d28423d}dialog::backdrop{background:#10253f80}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.estimate{font-size:1.2rem;font-weight:700;color:var(--blue)}.hint{padding:12px;background:#f4f7fa;border-radius:6px;font-size:.875rem;line-height:1.7}.catalog-results{max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:6px}.catalog-results button{width:100%;text-align:left;border:0;border-radius:0;border-bottom:1px solid var(--line);display:flex;gap:14px;align-items:center;font-weight:400}.catalog-results img{width:35px;height:40px;object-fit:contain}.catalog-results strong{color:var(--blue)}#notice{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);padding:13px 22px;border-radius:8px;background:#193b56;color:#fff;z-index:100;box-shadow:0 4px 20px #0003;display:none;max-width:90vw}#notice.show{display:block}.export-page{background:white;padding:25px;margin-bottom:20px;border:1px solid var(--line)}.export-page img.preview{width:100%;height:auto}.export-links{display:flex;gap:14px;flex-wrap:wrap;margin:15px 0}.accountrow{display:flex;justify-content:space-between;padding:18px 0;border-bottom:1px solid var(--line);gap:14px}.output-only{display:none}.subtle{margin-top:7px;color:var(--muted);font-size:.875rem}.quality-text{max-width:260px;color:#9a6510}.nowrap{white-space:nowrap}.history-note{max-width:200px;min-width:110px;overflow-wrap:anywhere}
@media(max-width:1150px){.shell{grid-template-columns:185px 1fr}aside{width:185px}.workspace{padding:24px 20px}.topbar{padding:0 20px}.metrics{gap:10px}.metric{padding:15px}.metric .value{font-size:1.5rem}.two-col{grid-template-columns:1fr}.brand{padding-left:4px;font-size:1.1rem}}
@media(max-width:760px){.shell{display:block}aside{position:static;width:auto;padding:14px}.brand{padding:0 8px 12px}.brand small,.aside-bottom{display:none}.nav{display:flex;overflow:auto;gap:5px}.nav button{white-space:nowrap;padding:10px}.navicon{display:none}.topbar{height:auto;padding:14px;flex-wrap:wrap}.workspace{padding:23px 14px}.heading{align-items:flex-start;flex-direction:column}.metrics{grid-template-columns:repeat(2,1fr)}.card{padding:16px}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}.login{grid-template-columns:1fr}.login-brand{padding:25px}.login-brand h1{font-size:1.5rem}.login-panel{padding:20px}.login form{padding:25px}.toolbar label{min-width:110px;flex:1}.form-footer{flex-wrap:wrap}h1{font-size:1.5rem}}
@media print{@page{size:A4 landscape;margin:10mm}body{background:white}#app,#notice,#editor,.dialog-head,.no-print{display:none!important}dialog#output{display:block!important;position:static;width:100%;max-width:none;max-height:none;border:0;padding:0;overflow:visible;box-shadow:none}dialog::backdrop{display:none}.export-page{border:0;padding:0;margin:0;break-after:page}.export-page:last-child{break-after:auto}th,td{padding:7px;font-size:10pt}tr{break-inside:avoid}thead{display:table-header}.output-only{display:block}.product img{width:35px;height:40px}}

/* 0.2: light ERP work surface, warmer product identity, clear financial states. */
:root{--blue:#326fa9;--nav:#f9fbfd;--muted:#687b8b;--line:#e0e7ed;color:#30485d;background:#f3f6f8}
aside{background:#fbfcfe;color:#445c70;border-right:1px solid #e0e7ed;padding:25px 12px}
.brand{color:#29475f;font-weight:700;letter-spacing:.02em}.brand small{color:#8797a5;letter-spacing:.06em;font-size:.8125rem}.brandmark{background:#e8a46b;color:#fff}
.nav{gap:5px}.nav button{color:#61758a;border-radius:7px;font-weight:500;padding:13px 16px}.nav button.active{color:#286898;background:#eaf2f9;box-shadow:inset 3px 0 #699cc9;font-weight:700}.nav button:hover{background:#f0f5f9;color:#365f82}.navicon{color:#829ab0}.nav button.active .navicon{color:#3b77ac}.aside-bottom{color:#8b9aaa;padding-left:16px}
.topbar{background:#fff;height:72px;border-color:#e5ebf0}.workspace{padding-top:26px}.heading p{font-size:.9375rem}h1{font-size:1.6rem;font-weight:650;letter-spacing:0}.card{border-color:#e3eaf0;border-radius:10px;box-shadow:0 3px 15px #24496d03}.primary{background:#3676ae;border-color:#3676ae}.primary:hover{background:#2b6598}.metric{background:#fff;border-color:#e4eaf0}.metric:first-child{border-top-color:#a4c5e0}.metric .value{color:#365975;font-size:1.7rem}.table-wrap{border-color:#e3eaf1}th{background:#f4f7fa;color:#697f92}td{border-color:#edf1f5}tbody tr:hover{background:#f8fbfd}.badge{background:#edf3f8;color:#668098}.badge.green{background:#edf7f3;color:#3c7d64}.badge.orange{background:#fff3e7;color:#9b6c3d}.warning{background:#fff9f0;border-color:#efdfc6;color:#8d704b}.info{background:#f0f6fb;color:#4f7597}.login-brand{background:#eaf1f8;color:#355772}.login-brand p{color:#6586a1}.login-brand h1{line-height:1.6}.notification-button{position:relative;border:0;background:#f4f7fa;font-size:.875rem;font-weight:500}.red-count{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:12px;padding:0 5px;background:#cc5a5a;color:white;font-size:.75rem;font-weight:700;margin-left:4px}
input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;accent-color:#427dac;cursor:pointer;flex:none}.check-cell{width:42px;text-align:center}.check-cell input{vertical-align:middle}.inline-check{display:flex;flex-direction:row;align-items:center;gap:10px;font-weight:400;margin:16px 0;line-height:1.6}.continue-check{border-top:1px solid var(--line);padding-top:16px}
.date-shortcuts{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 20px;font-size:.875rem;color:#7b8e9d}.date-shortcuts button{font-weight:400}.payment-filters{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:-5px;margin-bottom:20px;font-size:.9375rem}.payment-filters select{min-width:150px}.selection-bar{padding:15px 18px;border:1px solid #dde8f2;background:#f5f9fd;border-radius:8px;margin-bottom:22px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}#selection-summary{display:flex;align-items:center;flex-wrap:wrap;gap:10px 20px;font-size:.9375rem}#selection-summary strong{color:#3675a5}.paid-text{color:#438068}.unpaid-text{color:#b27940}tr:has([data-select-row]:checked){background:#f0f7fd}
.photo-upload{display:flex;gap:20px;align-items:center;padding:18px;border:1px dashed #c7d8e5;background:#f8fbfd;border-radius:8px}.photo-upload>div:first-child{width:108px;height:108px;display:grid;place-items:center;border:1px solid #e0e8ef;background:white;border-radius:6px;flex:none;color:#8d9ba8;font-size:.875rem}.photo-upload img{max-width:100%;max-height:106px;object-fit:contain}.photo-upload small{display:block;margin-top:10px;line-height:1.6}.upload-label{position:relative;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;background:#eaf3fa;color:#39749f;padding:12px 18px;border:1px solid #cddfed;border-radius:7px;cursor:pointer;font-size:.9375rem;font-weight:600;overflow:hidden}.upload-label input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.upload-label:focus-within{outline:2px solid #3676ae;outline-offset:3px}.upload-label:has(input:disabled){opacity:.5;cursor:not-allowed}.mapping-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.mapping-grid label{font-size:.875rem}.import-preview-table{max-height:340px;overflow:auto;margin:20px 0}details{padding:16px;border:1px solid var(--line);border-radius:7px;margin-top:16px}summary{cursor:pointer;color:#547894;font-weight:600}hr{border:0;border-top:1px solid var(--line);margin:25px 0}
.settings-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin-bottom:25px;overflow:auto}.settings-tabs button{border:0;border-radius:0;padding:13px 21px;color:#708398;background:transparent;white-space:nowrap}.settings-tabs button.selected{color:#2e6b9a;border-bottom:3px solid #70a0c6;background:#edf4fa}.steps{line-height:1.9;padding-left:24px}.steps li{margin:15px 0}.steps strong{color:#476e8c}.connection-card{padding:22px;background:#f3f7fb;border-radius:8px;margin:24px 0}.connection-card .actions{margin-top:14px}.button-link{background:white;border:1px solid #d4e2ec;border-radius:6px;text-decoration:none;padding:11px 17px;font-weight:600;font-size:.9375rem}.alert-item{display:flex;justify-content:space-between;gap:22px;align-items:center;border:1px solid #e0eaf2;border-left:3px solid #d99075;padding:22px;border-radius:8px;margin-bottom:14px;background:#fffdfb}.alert-item p{margin:10px 0}.alert-item.read{border-left-color:#c8d5df;background:#fbfcfe}.alert-item.read strong{color:#6b8091}.alert-item strong{font-size:1.0625rem}.alert-item b{color:#39725a}.history-note{max-width:240px}#restore-status,#upgrade-status{margin-top:20px}.placeholder{font-size:.75rem;min-width:50px}.form-footer{padding-bottom:3px}
@media(max-width:900px){.topbar{height:auto;min-height:72px;padding:13px 20px;flex-wrap:wrap}.identity{flex-wrap:wrap}.mapping-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-upload{gap:12px}.alert-item{align-items:flex-start;flex-direction:column}.selection-bar .actions{width:100%}}
@media(max-width:600px){.mapping-grid{grid-template-columns:1fr}.photo-upload{flex-wrap:wrap}.metrics{gap:10px}.metric .value{font-size:1.4rem}.settings-tabs button{padding:12px}.connection-card{padding:16px}.notification-button{padding:7px}.topbar .identity{gap:8px}.card-header{flex-wrap:wrap}}
@media print{.export-page{break-after:page}.export-page:last-child{break-after:auto}dialog#output .export-page .table-wrap{overflow:visible}.export-page .product img{width:55px;height:65px;max-height:none}.export-page .placeholder{width:55px;height:65px}.export-page h1{font-size:17pt}.export-page p{font-size:10pt}.export-page th{background:#eef3f7!important}th,td{overflow-wrap:anywhere}.export-page .product{min-width:110px}}
.demand-a4-page{margin:20px 0}.demand-a4-image{display:block;width:100%;height:auto;border:1px solid #dce5ed;margin-top:12px}
@media print{#output .demand-a4-page{margin:0;padding:0;break-inside:avoid;break-after:page}#output .demand-a4-page:last-child{break-after:auto}#output .demand-a4-image{display:block;border:0;margin:0 auto;width:auto!important;height:185mm!important;max-width:100%;max-height:none;object-fit:contain}#demand-output{margin:0;padding:0}}

/* Procurement receipts: clear cell boundaries and received-state emphasis. */
.export-page table th,.export-page table td{border:1px solid #8398a8}.export-page .table-wrap{border-radius:0}.export-page tr.purchase-received>td{background:#e0f3e7!important;color:#12633f;font-weight:600}.export-page tr.purchase-received .badge.green{background:#bee6cf;color:#0a5331;font-weight:700}.export-page table{-webkit-print-color-adjust:exact;print-color-adjust:exact}

.supplier-quick{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-bottom:20px;padding:14px;background:#eef4fa;border-radius:8px}.supplier-account-link{text-align:left;white-space:normal}

#record-form .restock-inline{display:block;width:auto;border:0;background:transparent;box-shadow:none;padding:5px 0 0;margin:0;color:#ba3030;font-size:12px;line-height:1.5;text-align:left;font-weight:500;cursor:pointer}
#record-form .restock-inline:hover{color:#8e1919;text-decoration:underline}
#record-form .restock-inline[hidden]{display:none}
#restock-details{max-width:560px;padding:24px;border:1px solid #d4dfe5;border-radius:14px;color:#293c48}#restock-details p{line-height:1.7}

.photo-upload:focus,.photo-upload.photo-dragging{outline:2px solid #167f79;outline-offset:3px;background:#eefaf8}.purchase-cancelled td{background:#fce7e7!important;color:#ad3030!important}.purchase-cancelled .badge{background:#f6cece!important;color:#9d2020!important;font-weight:800}@media print{.purchase-cancelled td{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
