.sub-metrics,.report-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:15px}
.sub-metrics article,.report-cards article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px}
.sub-metrics span,.report-cards span{display:block;color:var(--muted);font-size:11px}
.sub-metrics b,.report-cards b{display:block;font-size:20px;margin:9px 0 7px}
.sub-metrics small,.report-cards small{color:#929ba8;font-size:10px}
.list-panel{overflow:hidden}.list-head{display:flex;align-items:center;justify-content:space-between;padding:14px 17px;border-bottom:1px solid var(--line)}
.list-head input{width:250px;border:1px solid #dfe3e9;border-radius:7px;padding:9px}
.tabs{display:flex;gap:5px}.tabs button{border:0;background:transparent;padding:8px 11px;color:#717b89;border-radius:6px}.tabs button.active{background:#edf4ff;color:var(--blue);font-weight:700}
.text-btn{border:0;background:transparent;color:var(--blue);font-weight:600}.pill.partial{background:#fff3de;color:#d38420}.pill.pending{background:#eaf2ff;color:#2878d8}.pill.due-pill{background:#ffeaea;color:#dc4c4c}
.finance-grid{display:grid;grid-template-columns:1fr 260px;gap:15px}.payment-mix{padding-bottom:18px}
.receivable-overview{display:grid;grid-template-columns:1.35fr auto 1fr;align-items:center;gap:24px;padding:18px 20px;margin-bottom:15px;border-left:4px solid var(--orange)}.receivable-main span,.dashboard-fx span{display:block;color:var(--muted);font-size:11px}.receivable-main>b{display:block;color:var(--orange);font-size:26px;margin:4px 0}.receivable-main small{color:var(--muted)}.receivable-main small strong{color:var(--text)}.receivable-actions{padding:0 12px}.dashboard-fx{border-left:1px solid var(--line);padding-left:24px}.dashboard-fx b{display:block;font-size:17px;margin:5px 0}.dashboard-fx small{color:var(--muted);font-size:10px}
.compact-overview{grid-template-columns:1.2fr auto .8fr;padding:10px 15px;margin-bottom:12px;gap:16px;border-left-width:3px}.compact-overview .receivable-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.compact-overview .receivable-main>b{font-size:18px;margin:0}.compact-overview .receivable-main small{font-size:10px}.compact-overview .receivable-actions{padding:0}.compact-overview .receivable-actions button{height:31px;padding:0 12px;font-size:11px}.compact-overview .dashboard-fx{padding-left:16px}.compact-overview .dashboard-fx span,.compact-overview .dashboard-fx small{display:inline;font-size:9px}.compact-overview .dashboard-fx b{display:inline;margin:0 8px;font-size:13px}
.header-metrics{flex:1;max-width:980px;margin:0 28px;display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:9px;background:#f8fafc;overflow:hidden}.header-metrics article{min-width:0;padding:8px 13px;border-right:1px solid var(--line);background:#fff}.header-metrics article:last-child{border-right:0}.header-metrics p,.header-metrics b,.header-metrics small,.header-metrics article>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-metrics p{margin:0 0 3px;color:var(--muted);font-size:9px}.header-metrics b{font-size:14px}.header-metrics small,.header-metrics article>span{display:inline;color:var(--muted);font-size:8px}.header-metrics small{margin-right:5px;color:var(--blue)}.header-metrics .clickable-metric{border-radius:0;box-shadow:none}.header-metrics .clickable-metric:hover{transform:none;background:#f8fbff}.header-metrics .clickable-metric b{color:#6d4bd2}@media(max-width:1250px){.header-metrics{margin:0 14px}.header-metrics article{padding:8px}.header-metrics article>span{display:none}}@media(max-width:950px){.header-metrics{grid-template-columns:1fr 1fr;max-width:430px}.header-metrics article{padding:4px 8px}.header-metrics p{margin-bottom:1px}.header-metrics small{display:none}}@media(max-width:700px){.header-metrics{display:none!important}}
.nav-count{float:right;min-width:18px;padding:1px 5px;border-radius:10px;background:#ef5252;color:#fff;font-size:9px;font-style:normal;text-align:center}.preorder-alert{width:100%;display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:12px;margin-bottom:14px;padding:12px 16px;border:1px solid #f0cf86;border-radius:10px;background:#fff8e9;color:var(--text);text-align:left}.preorder-alert>span{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#ffe6ad;color:#9c6900}.preorder-alert b,.preorder-alert small{display:block}.preorder-alert small{margin-top:3px;color:var(--muted)}.preorder-alert em{color:#a36b00;font-style:normal;font-weight:700}.preorder-summary{grid-template-columns:1fr 1fr}.preorder-list{max-height:650px;overflow:auto}.preorder-card{display:grid;grid-template-columns:220px 1fr auto;gap:20px;align-items:start;padding:17px 19px;border-bottom:1px solid var(--line)}.preorder-card.done{opacity:.7;background:#fafafa}.preorder-meta b,.preorder-meta span,.preorder-meta small,.preorder-request span{display:block}.preorder-meta b{font-size:14px}.preorder-meta span{margin:5px 0;color:#126ee8}.preorder-meta small,.preorder-request span,.preorder-request small{color:var(--muted);font-size:10px}.preorder-request p{margin:5px 0 7px;line-height:1.6}.preorder-actions{display:flex;gap:7px}.customer-portal-mode .sidebar,.customer-portal-mode header{display:none}.customer-portal-mode main{margin:0}.customer-order-page{min-height:100vh;padding:35px 18px;background:linear-gradient(145deg,#101827,#1c2b43)}.customer-order-shell{width:min(680px,100%);margin:auto;padding:28px;border-radius:16px;background:#fff;box-shadow:0 22px 70px #0005}.customer-order-brand{display:flex;align-items:center;gap:12px;padding-bottom:20px;border-bottom:1px solid var(--line)}.customer-order-brand img{width:54px;height:54px;object-fit:contain}.customer-order-brand b,.customer-order-brand span{display:block}.customer-order-brand b{font-size:18px}.customer-order-brand span{margin-top:3px;color:var(--muted)}#customer-order-content>h1{margin:25px 0 7px}#customer-order-content>p{margin:0 0 22px;color:var(--muted)}#customer-order-form label{margin-bottom:15px}#customer-order-form input,#customer-order-form textarea{width:100%;margin-top:7px;padding:12px;border:1px solid #dfe3e9;border-radius:8px;font:inherit}#customer-order-form button{width:100%;height:45px;margin-top:4px}#customer-order-form>small{display:block;margin-top:12px;color:var(--muted);text-align:center}.preorder-success{padding:65px 10px;text-align:center}.preorder-success>span{display:grid;place-items:center;width:58px;height:58px;margin:auto;border-radius:50%;background:#e5f8f0;color:#0c9b66;font-size:28px}.preorder-success h1{margin:20px 0 8px}.preorder-success p,.preorder-success small{color:var(--muted)}@media(max-width:760px){.preorder-card{grid-template-columns:1fr}.preorder-actions{justify-content:flex-end}.preorder-alert em{display:none}.customer-order-shell{padding:20px}}
.preorder-success small{display:block}.preorder-success button{height:40px;margin-top:22px}
.preorder-delete{height:38px;padding:0 13px;border:1px solid #f2bcbc;border-radius:8px;background:#fff2f2;color:#d83d3d;font-weight:700}.preorder-delete:hover{background:#ffe5e5}
.customer-ai-inquiry{margin:20px 0;padding:16px;border:1px solid #cfe0f6;border-radius:11px;background:#f5f9ff}.customer-ai-inquiry>div:first-child b,.customer-ai-inquiry>div:first-child small{display:block}.customer-ai-inquiry>div:first-child small{margin-top:3px;color:var(--muted)}.customer-ai-box{display:flex;gap:8px;margin-top:12px}.customer-ai-box input{flex:1;min-width:0;padding:11px 12px;border:1px solid #cbd8e9;border-radius:8px;font:inherit}.customer-ai-box button{border:0;border-radius:8px;background:#172235;color:#fff;padding:0 16px;font-weight:700}.customer-inquiry-result{margin-top:12px;padding:13px;border-radius:8px;background:#fff;border:1px solid #dce6f2}.customer-inquiry-result>p{margin:6px 0;color:var(--muted)}.customer-inquiry-result>small{color:var(--muted)}.inquiry-products{margin:9px 0}.inquiry-products article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.inquiry-products article:last-child{border-bottom:0}.inquiry-products strong,.inquiry-products small{display:block}.inquiry-products small{margin-top:3px;color:var(--muted)}.inquiry-products article>b{color:#087e51;white-space:nowrap}@media(max-width:520px){.customer-ai-box{display:block}.customer-ai-box button{width:100%;height:42px;margin-top:8px}}
.customer-ai-box .customer-inquiry-clear{border:1px solid #cbd8e9;background:#fff;color:#526176}.customer-ai-box .customer-inquiry-clear:hover{background:#edf3f9}
#manual-inquiry-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}#manual-inquiry-form input,#manual-inquiry-form textarea{width:100%;padding:10px;border:1px solid #d6e0ec;border-radius:7px;font:inherit}#manual-inquiry-form textarea,#manual-inquiry-form button{grid-column:1/-1}#manual-inquiry-form button{height:40px;border:0;border-radius:7px;background:#d7a83d;color:#211a0d;font-weight:700}.manual-inquiry-success{padding:8px 0}.manual-inquiry-success b{color:#087e51}.manual-inquiry-success p{margin:5px 0 0;color:var(--muted)}@media(max-width:520px){#manual-inquiry-form{grid-template-columns:1fr}#manual-inquiry-form textarea,#manual-inquiry-form button{grid-column:auto}}
.inventory-alert-banner{display:grid;grid-template-columns:auto 1.2fr 1fr auto;align-items:center;gap:18px;margin-bottom:15px;padding:17px 20px;border:1px solid #ffb14a;border-radius:11px;background:linear-gradient(105deg,#fff4d8,#fff9ee 55%,#ffe7dd);box-shadow:0 7px 22px #f39b3522}.inventory-alert-icon{width:44px;height:44px;border-radius:12px;background:#ef5252;color:#fff;display:grid;place-items:center;font-size:25px;font-weight:900;box-shadow:0 0 0 6px #ef52521a}.inventory-alert-copy span,.inventory-alert-copy b,.inventory-alert-copy small{display:block}.inventory-alert-copy span{color:#b66310;font-size:11px;font-weight:700}.inventory-alert-copy b{font-size:18px;margin:3px 0}.inventory-alert-copy small{color:#8b6a42}.inventory-alert-copy small button{border:0;background:transparent;color:#9d4f0c;padding:0 2px;text-decoration:underline;cursor:pointer}.inventory-alert-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.inventory-alert-stats button{text-align:center;padding:8px;border:1px solid transparent;border-radius:8px;background:#ffffffa8;cursor:pointer;transition:.18s ease}.inventory-alert-stats button:hover{border-color:#f09b47;background:#fff;transform:translateY(-1px)}.inventory-alert-stats strong,.inventory-alert-stats span{display:block}.inventory-alert-stats strong{font-size:18px;color:#d84b35}.inventory-alert-stats span{font-size:9px;color:#8a6944}.inventory-alert-banner>button{border:0;background:#ef5252;color:#fff;border-radius:8px;padding:12px 16px;font-weight:700;cursor:pointer}
.donut{width:140px;height:140px;margin:18px auto;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#1677ff 0 48%,#19b77c 48% 79%,#d7a83d 79% 93%,#8b6ddd 93%);position:relative}
.donut:after{content:"";position:absolute;inset:25px;border-radius:50%;background:#fff}.donut div{position:relative;z-index:1;text-align:center}.donut b,.donut span{display:block}.donut span{font-size:9px;color:var(--muted)}
.payment-mix ul{list-style:none;margin:0;padding:0 22px}.payment-mix li{display:flex;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:11px}.payment-mix li b{margin-left:auto}.payment-mix li i{width:8px;height:8px;border-radius:50%}
.bank{background:#1677ff}.cash{background:#19b77c}.wallet{background:#d7a83d}.card{background:#8b6ddd}.red-text{color:var(--red)!important}.green-text{color:var(--green)!important}
.bar-chart{height:235px;margin:20px 28px;display:flex;align-items:flex-end;justify-content:space-around;border-bottom:1px solid var(--line)}.bar-chart i{width:32px;background:linear-gradient(180deg,#328bf3,#87baf5);border-radius:5px 5px 0 0}
.ranking ol{list-style:none;padding:5px 18px;margin:0}.ranking li{display:flex;align-items:center;gap:11px;padding:14px 0;border-bottom:1px solid var(--line)}.ranking li>span{width:24px;height:24px;display:grid;place-items:center;border-radius:7px;background:#fff2d5;color:#a97811;font-weight:700}.ranking li div{flex:1}.ranking li b,.ranking li small{display:block}.ranking li small{color:var(--muted);font-size:10px}
.supplier-payable-panel{margin-top:16px}.supplier-payable-panel table{min-width:900px}.supplier-payable-panel .expense-total{min-width:175px}
.report-filter-bar{display:flex;align-items:flex-end;justify-content:flex-end;gap:9px;flex-wrap:wrap}.report-filter-bar label{display:grid;gap:5px;color:var(--muted);font-size:11px}.report-filter-bar input{height:38px;border:1px solid var(--line);border-radius:8px;padding:0 10px;background:#fff;color:var(--navy)}.report-filter-bar>span{color:var(--muted);padding-bottom:10px}.report-cards{grid-template-columns:repeat(4,1fr)}.report-detail-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.7fr);gap:16px;align-items:start}.report-table-panel table{min-width:1180px}.report-ranking{overflow:hidden}.report-ranking strong{white-space:nowrap;font-size:12px}.report-table-panel .panel-title{align-items:flex-end}.report-table-panel .panel-title small{color:var(--muted);text-align:right}
.report-cost-notice{margin:-2px 0 15px;padding:12px 15px;border:1px solid #efc36b;border-radius:9px;background:#fff8e7;color:#725516;font-size:12px;line-height:1.55}.report-cost-notice b{color:#9b6709}
.report-expense-panel{margin-bottom:16px}.report-expense-panel .panel-title{padding:15px 18px}.report-expense-panel table td,.report-expense-panel table th{padding:12px 16px}
.report-empty-prompt{margin-top:18px;padding:32px 20px;border:1px dashed #cbd5e1;border-radius:12px;background:#fff;text-align:center;color:#64748b;font-size:15px}.report-empty-prompt[hidden],[data-report-result][hidden]{display:none!important}
.report-legacy-summary{grid-template-columns:repeat(9,minmax(105px,1fr));gap:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:0;overflow-x:auto}.report-legacy-summary article{min-width:105px;border:0;border-radius:0;padding:16px 13px;background:transparent}.report-legacy-summary article+article{border-left:1px solid #edf0f4}.report-legacy-summary span{font-size:12px;color:#344052;white-space:nowrap}.report-legacy-summary b{font-size:20px;margin:7px 0 0;white-space:nowrap}.report-legacy-summary small{margin-top:4px;white-space:nowrap}.report-legacy-summary #report-gross-profit,.report-legacy-summary #report-net-profit{color:#0c9b62}.report-legacy-summary #report-other-expense{color:#d87c16}.report-cash-cards{grid-template-columns:repeat(4,1fr)}
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.contact-row{display:flex;align-items:center;gap:11px;padding:16px 18px;border-bottom:1px solid var(--line)}.contact-row>div:nth-child(2){flex:1}.contact-row b,.contact-row small{display:block}.contact-row small{color:var(--muted);font-size:10px}.contact-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#e8f2ff;color:var(--blue);font-weight:700}.contact-avatar.supplier{background:#fff2d8;color:#a97811}
@media(max-width:1000px){.sub-metrics,.report-cards{grid-template-columns:1fr 1fr}.finance-grid,.contact-grid,.report-detail-grid{grid-template-columns:1fr}.payment-mix{display:none}.receivable-overview{grid-template-columns:1fr auto}.dashboard-fx{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:14px 0 0}.inventory-alert-banner{grid-template-columns:auto 1fr auto}.inventory-alert-stats{grid-column:1/-1;grid-row:2}.report-filter-bar{justify-content:flex-start}}

.import-steps{display:grid;grid-template-columns:repeat(4,1fr);padding:17px 20px;margin-bottom:14px}.step{display:flex;align-items:center;gap:11px;position:relative}.step:not(:last-child):after{content:"";position:absolute;left:38px;right:14px;top:16px;height:2px;background:#e5e9ef}.step i{position:relative;z-index:1;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#edf0f4;color:#8993a1;font-style:normal;font-weight:700}.step div{position:relative;z-index:1;background:white;padding-right:8px}.step b,.step span{display:block}.step b{font-size:12px}.step span{font-size:10px;color:var(--muted);margin-top:3px}.step.done i{background:#e6f8f1;color:#0a9d65}.step.current i{background:var(--gold);color:#251c0c}.step.current b{color:#9a6e13}
.import-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:14px}.import-metrics article{background:#fff;border:1px solid var(--line);border-radius:11px;padding:16px 18px}.import-metrics span,.import-metrics small{display:block}.import-metrics span{font-size:11px;color:var(--muted)}.import-metrics b{display:block;font-size:19px;margin:8px 0 5px}.import-metrics em{font-size:11px;font-style:normal;color:var(--muted)}.import-metrics small{font-size:10px;color:#929ba8}
.migration-batches{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.migration-batches button{position:relative;text-align:left;border:1px solid var(--line);border-radius:11px;background:#fff;padding:16px 17px;cursor:pointer;transition:.18s ease}.migration-batches button:hover{border-color:#d8ab44;box-shadow:0 6px 18px #c8952b18;transform:translateY(-1px)}.migration-batches span,.migration-batches b,.migration-batches small{display:block}.migration-batches span{font-size:11px;color:var(--muted)}.migration-batches b{font-size:21px;margin:7px 0 5px}.migration-batches small{font-size:10px;color:#7c8797;padding-right:52px}.migration-batches i{position:absolute;right:12px;top:14px;border-radius:12px;padding:4px 7px;font-size:9px;font-style:normal;font-weight:700}.batch-ready{background:#e5f8f0;color:#087b50}.batch-review{background:#fff0d9;color:#c47715}.mapping-editor{display:flex;gap:7px;margin-top:9px}.mapping-editor select{min-width:260px;max-width:390px;border:1px solid #e0b35a;border-radius:6px;background:#fff;padding:7px;font-size:10px}.mapping-editor button{white-space:nowrap;padding:7px 10px;font-size:10px}.mapping-change{border:0;background:transparent;color:var(--blue);font-size:10px;margin-left:7px;cursor:pointer}.import-complete{background:#0ba46b!important;color:#fff!important}
.import-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:14px;margin-bottom:14px}.match-count,.safe-badge{background:#e6f8f1!important;color:#087c50!important}.mapping-list{display:grid;grid-template-columns:1fr 1fr}.mapping-list>div{display:grid;grid-template-columns:1fr 1fr 22px;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line);font-size:11px}.mapping-list>div:nth-child(odd){border-right:1px solid var(--line)}.mapping-list span{color:var(--muted)}.mapping-list i{font-style:normal;color:var(--green);font-weight:800}.import-rules{overflow:hidden}.rule-check{display:block;padding:9px 16px;margin:0;border-bottom:1px solid #f0f2f5;color:var(--text);font-size:11px}.rule-check input{accent-color:#bf8d26;margin-right:8px}.test-number{margin:12px 15px;padding:12px 14px;border-radius:8px;background:#111b2c;color:white}.test-number span,.test-number b,.test-number small{display:block}.test-number span{font-size:9px;color:#93a1b5}.test-number b{color:#f0c55e;margin:5px 0;font-size:14px}.test-number small{font-size:9px;color:#8795a9}
.preview-panel{overflow:hidden}.preview-actions{display:flex;gap:6px}.filter-chip{border:0;border-radius:14px;padding:5px 10px;background:#edf4ff;color:var(--blue);font-size:10px}.filter-chip.warning{background:#fff1dd;color:#cf7b18}.import-table{margin:0}.import-table td{padding-top:11px;padding-bottom:11px}.due-value{color:#e18323;font-weight:700}.needs-match{background:#fffbf3}.import-footer{display:flex;align-items:center;gap:16px;padding:12px 17px;background:#fafbfc;font-size:10px;color:var(--muted)}.import-footer>span:first-child i{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:5px}.warning-text{color:#d47c18!important}.import-footer button{margin-left:auto}
.import-viewbar{display:flex;gap:10px;align-items:center;padding:13px 17px;border-bottom:1px solid var(--line)}.view-tabs{display:flex;gap:5px;margin-right:auto}.view-tabs button{border:0;border-radius:7px;padding:8px 11px;background:#f1f3f6;color:#6f7987;font-size:11px}.view-tabs button.active{background:#172235;color:#fff}.import-viewbar input{width:250px;border:1px solid #dfe3e9;border-radius:7px;padding:9px 11px}.import-viewbar select{border:1px solid #dfe3e9;border-radius:7px;padding:9px;background:#fff;color:#5f6875}.import-table-wrap{overflow:auto;max-height:520px}.import-table{min-width:1120px}.import-table th{position:sticky;top:0;z-index:1}.match-line{color:#098d5c;font-size:9px}.unmatch-line{color:#d47c18;font-size:9px}.detail-btn{border:1px solid #cfe1fb;background:#eff6ff;color:var(--blue);border-radius:6px;padding:6px 9px;font-size:10px}.import-pages{display:flex;gap:4px;margin-left:auto}.import-pages button{border:1px solid #dde2e9;background:#fff;border-radius:5px;padding:5px 8px;color:#657080;font-size:10px}.import-pages button.active{background:#172235;color:#fff;border-color:#172235}.order-modal{position:fixed;inset:0;background:#08101db8;z-index:20;display:flex;justify-content:flex-end}.modal-card{width:min(760px,92vw);height:100%;background:#f5f7fa;box-shadow:-16px 0 50px #0003;overflow:auto}.modal-head{position:sticky;top:0;background:#172235;color:#fff;padding:21px 24px;display:flex;justify-content:space-between;align-items:center;z-index:2}.modal-head span{font-size:10px;color:#94a0b3}.modal-head h2{margin:4px 0 0;font-size:19px}.modal-head button{border:0;background:#ffffff18;color:#fff;border-radius:7px;width:34px;height:34px;font-size:21px}.detail-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:18px}.detail-summary div,.detail-section{background:#fff;border:1px solid var(--line);border-radius:9px}.detail-summary div{padding:13px}.detail-summary span,.detail-summary b{display:block}.detail-summary span{font-size:9px;color:var(--muted);margin-bottom:5px}.detail-summary b{font-size:12px}.detail-section{margin:0 18px 18px;overflow:hidden}.detail-section h3{font-size:13px;margin:0;padding:13px 15px;border-bottom:1px solid var(--line)}.detail-products{width:100%;margin:0}.detail-products td{vertical-align:top}.code-pill{display:inline-block;margin-top:4px;padding:3px 6px;border-radius:4px;background:#e8f7f1;color:#078458;font-size:9px}.code-pill.unmatched{background:#fff1dd;color:#cf7b18}.detail-total{padding:14px 16px;background:#fff;display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.detail-total span,.detail-total b{display:block;text-align:right}.detail-total span{font-size:9px;color:var(--muted)}.detail-total b{font-size:14px;margin-top:4px}.detail-note{padding:0 18px 18px;color:var(--muted);font-size:10px}.empty-row{text-align:center;padding:42px!important;color:var(--muted)}
@media(max-width:1100px){.import-grid{grid-template-columns:1fr}.mapping-list{grid-template-columns:1fr}.mapping-list>div:nth-child(odd){border-right:0}.import-table{min-width:900px}.preview-panel{overflow:auto}.migration-batches{grid-template-columns:1fr 1fr}}@media(max-width:760px){.import-steps,.import-metrics,.migration-batches{grid-template-columns:1fr 1fr}.step:after{display:none}.mapping-editor{flex-direction:column}.mapping-editor select{min-width:0;width:100%}}
.row-actions{display:flex;gap:5px}.invoice-btn{border:1px solid #dec27c;background:#fff8e7;color:#9a7018;border-radius:6px;padding:6px 9px;font-size:10px;white-space:nowrap}.detail-command{padding:14px 18px 0;text-align:right}.detail-command .primary{height:36px}.invoice-modal{position:fixed;inset:0;background:#0b1220d8;z-index:30;overflow:auto;padding:28px}.invoice-shell{width:min(1180px,96vw);margin:auto}.invoice-toolbar{display:flex;align-items:center;gap:9px;background:#172235;color:#fff;padding:13px 16px;border-radius:11px 11px 0 0}.invoice-toolbar>div{flex:1}.invoice-toolbar b,.invoice-toolbar span{display:block}.invoice-toolbar span{font-size:10px;color:#9ba8ba;margin-top:3px}.invoice-paper{background:#fff;min-height:760px;padding:34px 42px 30px;color:#111;box-shadow:0 20px 60px #0005}.invoice-head{display:grid;grid-template-columns:150px 1fr 125px;align-items:center}.invoice-brand{text-align:center}.invoice-logo{width:66px;height:54px;display:grid;place-items:center;margin:auto;border:5px solid #149dc6;color:#097ca2;font-size:24px;font-weight:800;clip-path:polygon(50% 0,100% 22%,100% 78%,50% 100%,0 78%,0 22%)}.invoice-brand>b{display:block;font-size:13px;margin-top:3px}.invoice-head h1{text-align:center;font-size:36px;letter-spacing:3px;margin:0}.invoice-slogan{height:78px;background:linear-gradient(145deg,#1b3154,#ee8b1d);color:#ffe58b;display:grid;place-items:center;align-content:center;border-radius:3px;transform:skew(-2deg)}.invoice-slogan b{font-size:25px;font-style:italic}.invoice-slogan span{font-size:14px;font-weight:700}.invoice-info{display:grid;grid-template-columns:1fr 1fr 1fr 1.15fr;gap:18px;font-size:13px;margin:10px 3px}.invoice-info-top{grid-template-columns:1fr 1fr;margin-top:8px}.invoice-table{border-collapse:collapse;margin-top:12px}.invoice-table th,.invoice-table td{border:1px solid #111;padding:7px 6px;text-align:center;font-size:12px}.invoice-table th{background:#fff;color:#111;font-size:12px}.invoice-table .item-name{text-align:left}.invoice-total-row td{font-weight:600}.invoice-settlement{display:flex;justify-content:space-between;font-size:13px;padding:12px 4px 8px}.invoice-balance{text-align:right;padding:4px;font-size:13px}.invoice-balance b{color:#bd771c}.invoice-usdt{margin-top:30px;font-size:13px}.invoice-footnote{text-align:center;color:#8a929d;font-size:10px;margin-top:65px;border-top:1px solid #eceff3;padding-top:10px}
@media(max-width:800px){.invoice-modal{padding:0}.invoice-shell{width:100%}.invoice-paper{width:1000px;transform-origin:top left;transform:scale(.72);margin-bottom:-200px}.invoice-toolbar{position:sticky;top:0;z-index:3;border-radius:0}.invoice-toolbar span{display:none}}
@media print{body>*{display:none!important}#invoice-modal:not(.hidden),#purchase-report-modal:not(.hidden),#customer-statement-modal:not(.hidden){display:block!important;position:static;background:#fff;padding:0}#invoice-modal .invoice-toolbar,#purchase-report-modal .invoice-toolbar,#customer-statement-modal .invoice-toolbar{display:none!important}#invoice-modal .invoice-shell,#purchase-report-modal .invoice-shell,#customer-statement-modal .invoice-shell{width:100%;margin:0}#invoice-paper,#purchase-report-paper,#customer-statement-paper{display:block!important;box-shadow:none;padding:10mm 8mm;min-height:0}.invoice-head h1{font-size:28px}.invoice-footnote{margin-top:35px}@page{size:A4 landscape;margin:6mm}}
.contact-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:15px}.contact-summary article{background:#fff;border:1px solid var(--line);border-radius:11px;padding:18px;box-shadow:0 2px 7px #1f2d4210}.contact-summary span,.contact-summary b,.contact-summary small{display:block}.contact-summary span{font-size:11px;color:var(--muted);margin-bottom:8px}.contact-summary b{font-size:21px;margin-bottom:5px}.contact-summary small{font-size:10px;color:#929aa6}.customer-panel{overflow:hidden}.contact-table-wrap{overflow:auto;max-height:520px}.contact-table-wrap table{margin:0;min-width:900px}.contact-table-wrap thead{position:sticky;top:0;z-index:1}.customer-footer{display:flex;justify-content:space-between;padding:12px 17px;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.supplier-summary{margin-top:18px}.purchase-items{min-width:330px;max-width:560px;line-height:1.55}@media(max-width:700px){.contact-summary{grid-template-columns:1fr}.customer-footer{display:block}.customer-footer span{display:block;margin:4px 0}}
.product-row{cursor:pointer}.product-row:hover td{background:#f5f9ff}.product-edit-card{width:min(720px,96vw)}.product-edit-form{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:22px}.product-edit-form label{font-size:11px;color:var(--muted)}.product-edit-form input,.product-edit-form select,.product-edit-form textarea{display:block;width:100%;margin-top:6px;border:1px solid #dce2e9;border-radius:7px;background:#fff;padding:10px;color:var(--text);font:inherit}.product-edit-form input[readonly]{background:#eef1f5;color:#7a8491}.product-edit-form .wide{grid-column:1/-1}.edit-notice{padding:11px 13px;border-radius:7px;background:#fff7df;color:#8a6518;font-size:10px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:3px}.sales-record-filters{border-bottom:1px solid var(--line)}.sales-record-wrap{max-height:560px}.payment-input{display:flex!important;gap:6px;align-items:center}.payment-input input{flex:1;min-width:0}.payment-input button{border:1px solid #d9b85d;background:#fff7dc;color:#8b6719;border-radius:6px;padding:7px 10px;white-space:nowrap;font-weight:700}.payment-input button:hover{background:#f5df9f}@media(max-width:700px){.product-edit-form{grid-template-columns:1fr}.product-edit-form .wide{grid-column:auto}}
.currency-picker{margin-left:auto;display:flex;flex-direction:column;gap:4px}.currency-picker label{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}.currency-picker select{border:1px solid #dce2e9;border-radius:7px;background:#fff;padding:8px 28px 8px 10px;color:var(--text);font-weight:700}.currency-picker small{color:#8a6a20;font-size:9px;text-align:right;min-width:205px}@media(max-width:780px){.currency-picker{width:100%;margin-left:0}.currency-picker small{text-align:left}}
.sales-currency-switch{margin-left:auto;display:grid;grid-template-columns:auto auto auto;align-items:center;gap:5px;padding:5px;border:1px solid var(--line);border-radius:9px;background:#fff}.sales-currency-switch>span{font-size:11px;color:var(--muted);padding:0 5px}.sales-currency-switch button{border:0;border-radius:6px;background:#f4f6f9;color:#506079;padding:8px 11px;font-weight:700;cursor:pointer}.sales-currency-switch button.active{background:#15243a;color:#fff}.sales-currency-switch small{grid-column:1/-1;text-align:right;color:#9b6a13;font-size:9px;padding:0 4px}.inventory-metrics article{cursor:pointer;transition:.18s ease}.inventory-metrics article:hover{border-color:#e2aa32;box-shadow:0 5px 15px #d9a82c1a;transform:translateY(-1px)}
.stocktake-card{max-width:1120px}.stocktake-grid{display:grid;grid-template-columns:minmax(320px,.85fr) 1.35fr;gap:24px;padding:24px}.stocktake-grid>section:first-child{display:flex;flex-direction:column;gap:14px}.stocktake-grid label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:13px}.stocktake-grid input,.stocktake-grid select,.stocktake-grid textarea{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;padding:11px 12px;color:var(--text);font:inherit}.stocktake-numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stocktake-numbers>div{min-height:82px;padding:12px;border-radius:9px;background:#f5f7fa;display:flex;flex-direction:column;justify-content:center}.stocktake-numbers span{font-size:11px;color:var(--muted)}.stocktake-numbers b{font-size:20px;margin-top:5px}.stocktake-numbers input{margin-top:5px;padding:6px 8px;font-weight:800;font-size:18px}.stocktake-history h3{margin:0 0 12px}.stocktake-history table small{display:block;color:var(--muted);font-size:10px}.stocktake-history .contact-table-wrap{max-height:420px;overflow:auto}@media(max-width:900px){.stocktake-grid{grid-template-columns:1fr}.sales-currency-switch{order:3;width:100%;margin-left:0}.sales-currency-switch small{text-align:left}.stocktake-numbers{grid-template-columns:1fr 1fr 1fr}}
.purchase-currency-switch{margin-left:auto}.list-head #purchase-sort{border:1px solid var(--line);border-radius:7px;background:#fff;padding:9px 11px;color:var(--text)}#purchase-detail-content .detail-products td:nth-child(n+3){text-align:right}#purchase-report-paper .invoice-table{width:100%}
.purchase-row-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}.pay-now-btn,.payment-record-btn{border:0;border-radius:7px;padding:7px 10px;font-size:10px;font-weight:700;cursor:pointer}.pay-now-btn{background:#dca72f;color:#1e180a}.payment-record-btn{background:#e8f7f1;color:#087b50}.purchase-payment-card{width:min(720px,96vw)}.purchase-payment-content{padding:22px}.payment-order-summary{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-bottom:18px}.payment-order-summary>div,.payment-after{border:1px solid var(--line);border-radius:9px;background:#fff;padding:13px}.payment-order-summary span,.payment-order-summary b,.payment-after span,.payment-after b{display:block}.payment-order-summary span,.payment-after span{font-size:10px;color:var(--muted);margin-bottom:5px}.payment-order-summary b,.payment-after b{font-size:14px}.purchase-payment-content form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.purchase-payment-content form>label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:12px}.purchase-payment-content form>label:first-child,.purchase-payment-content form>label:nth-child(4),.purchase-payment-content .payment-after,.purchase-payment-content form>.modal-actions{grid-column:1/-1}.purchase-payment-content input,.purchase-payment-content select,.purchase-payment-content textarea{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;padding:11px 12px;color:var(--text);font:inherit}.amount-entry{display:flex;gap:8px}.amount-entry input{font-size:20px;font-weight:800}.amount-entry button{border:1px solid #d9b85d;border-radius:8px;background:#fff7dc;color:#8b6719;padding:0 14px;font-weight:700;white-space:nowrap}.payment-after{display:flex;align-items:center;justify-content:space-between;background:#fff9e9}.payment-after b{font-size:20px;color:#da811d}.payment-record-section{margin-top:22px;border-top:1px solid var(--line);padding-top:17px}.payment-record-section h3{margin:0 0 10px;font-size:14px}.payment-record{display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;margin-bottom:7px}.payment-record b,.payment-record small{display:block}.payment-record small{color:var(--muted);margin-top:4px}.payment-record strong{color:#078458}.empty-payment-record{padding:22px;text-align:center;border:1px dashed var(--line);border-radius:8px;color:var(--muted)}@media(max-width:650px){.payment-order-summary,.purchase-payment-content form{grid-template-columns:1fr}.purchase-payment-content form>label:first-child,.purchase-payment-content form>label:nth-child(4),.purchase-payment-content .payment-after,.purchase-payment-content form>.modal-actions{grid-column:auto}}
.payment-status-select{border:0;border-radius:16px;padding:6px 25px 6px 10px;font-size:11px;font-weight:700;cursor:pointer}.payment-status-select.paid{background:#e6f8f1;color:#078458}.payment-status-select.partial{background:#fff3de;color:#c77818}.payment-status-select.unpaid{background:#eaf2ff;color:#2878d8}
.order-product-select{width:100%;min-width:210px;border:1px solid #dfe3e9;border-radius:6px;background:#fff;padding:8px;color:var(--text)}.order-price-input{width:100px;border:1px solid #dfe3e9;border-radius:6px;padding:8px}.finance-customer-row{cursor:pointer;background:#fff}.finance-customer-row:hover{background:#fafcff}.finance-customer-row td:first-child b{font-size:13px}.finance-detail-row{background:#f8fafc}.finance-detail-row td{padding-top:9px;padding-bottom:9px}.finance-expand{border:0;background:#edf4ff;color:var(--blue);border-radius:6px;padding:6px 9px;font-weight:600}
.report-settings-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:15px}.settings-card{overflow:hidden}.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:20px}.settings-form .wide{grid-column:1/-1}.settings-form input{width:100%;margin-top:6px;border:1px solid #dfe3e9;border-radius:7px;padding:11px}.setting-switches{display:grid;grid-template-columns:1fr 1fr;padding:12px 20px}.setting-switches label{display:flex;align-items:center;gap:9px;margin:0;padding:11px 4px;border-bottom:1px solid var(--line);font-size:12px;color:var(--text)}.setting-switches input{width:17px;height:17px;accent-color:var(--gold)}.settings-tip{margin-top:15px;padding:15px 18px;color:#7c651f;background:#fff9e8}.invoice-info-custom{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}@media(max-width:900px){.report-settings-grid{grid-template-columns:1fr}}@media(max-width:600px){.settings-form,.setting-switches{grid-template-columns:1fr}.settings-form .wide{grid-column:auto}}
.table-sort-btn{border:0;background:transparent;color:#596574;font:inherit;font-weight:700;padding:3px 0}.table-sort-btn span{display:inline-grid;place-items:center;width:19px;height:19px;margin-left:4px;border-radius:5px;background:#e6effd;color:#1677ff}.table-sort-btn:hover{color:#1677ff}
.delivery-metrics article:nth-child(2) b{color:#df831c}.delivery-metrics article:nth-child(3) b{color:#1677ff}.delivery-metrics article:nth-child(4) b{color:#078458}#delivery-body td small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.delivery-actions{display:flex;gap:6px;white-space:nowrap}.delivery-actions button{border:1px solid #cfd9e6;border-radius:7px;background:#fff;color:#176fd3;padding:7px 9px;font-weight:700;cursor:pointer}.delivery-actions button.primary{border-color:#dca72f;background:#dca72f;color:#191509}#sales-conversion-source{color:#b97916;font-weight:700}.partner-detail-card{width:min(1020px,96vw)}.partner-detail-content{padding:22px}.partner-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.partner-summary>div{padding:14px;border:1px solid var(--line);border-radius:9px;background:#f8fafc}.partner-summary span,.partner-summary b{display:block}.partner-summary span{font-size:10px;color:var(--muted);margin-bottom:5px}.partner-summary b{font-size:18px}.partner-contact{padding:12px 14px;border-radius:8px;background:#fff8e5;color:#645526}.partner-detail-content table{min-width:760px}@media(max-width:700px){.partner-summary{grid-template-columns:1fr 1fr}}
.smart-entry{padding:13px;border:1px solid #dce7f5;border-radius:10px;background:#f7faff}.smart-entry>label{display:block;margin-bottom:8px;color:#263a55;font-weight:800}.smart-entry .parse-result{margin-top:10px}.smart-candidates{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px;max-height:210px;overflow:auto}.smart-candidates button{border:1px solid #cddcf0;border-radius:8px;background:#fff;padding:10px;text-align:left;cursor:pointer}.smart-candidates button:hover{border-color:#297ce0;background:#f0f6ff}.smart-candidates b,.smart-candidates small{display:block}.smart-candidates small{margin-top:4px;color:var(--muted)}@media(max-width:650px){.smart-candidates{grid-template-columns:1fr}}
.dashboard-smart-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.dashboard-smart-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:17px 18px;box-shadow:0 3px 12px #1722350c}.dashboard-smart-card>div:first-child{margin-bottom:12px}.dashboard-smart-card span{font-size:12px;font-weight:800}.dashboard-smart-card h2{margin:4px 0;font-size:18px}.dashboard-smart-card p{margin:0;color:var(--muted);font-size:12px}.delivery-smart-card{border-left:4px solid #1677ff}.delivery-smart-card span{color:#1677ff}.purchase-smart-card{border-left:4px solid #dca72f}.purchase-smart-card span{color:#a8700c}.dashboard-smart-card .parse-result{margin-top:10px}@media(max-width:900px){.dashboard-smart-actions{grid-template-columns:1fr}}
.delivery-expense-panel{margin-top:18px}.delivery-expense-panel .list-head{align-items:center}.expense-total{text-align:right}.expense-total span,.expense-total b{display:block}.expense-total span{font-size:11px;color:var(--muted)}.expense-total b{margin-top:4px;color:#d87918;font-size:21px}.delivery-expense-panel table{min-width:900px}
.sales-multi-filter{position:relative}.sales-multi-filter summary{list-style:none;display:flex;align-items:center;gap:7px;border:1px solid #dfe3e9;border-radius:7px;background:#fff;padding:9px 12px;color:#4d5968;cursor:pointer;white-space:nowrap}.sales-multi-filter summary::-webkit-details-marker{display:none}.sales-multi-filter summary span{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:10px;background:#e9f2ff;color:#1677ff;font-size:10px;font-weight:800}.sales-filter-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:9;width:min(620px,88vw);display:grid;grid-template-columns:1.15fr .85fr;gap:18px;padding:18px;border:1px solid var(--line);border-radius:11px;background:#fff;box-shadow:0 16px 42px #17223526}.filter-group>b{display:block;margin-bottom:9px;font-size:12px}.filter-group>input,.date-filter-group input{width:100%;border:1px solid #dfe3e9;border-radius:7px;padding:9px 10px}.filter-check-list{max-height:210px;overflow:auto;margin-top:8px;border:1px solid var(--line);border-radius:8px}.filter-check-list label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:9px 10px;border-bottom:1px solid #edf0f4;cursor:pointer}.filter-check-list label:last-child{border-bottom:0}.filter-check-list small{color:var(--muted)}.date-filter-group label{display:block;margin-bottom:10px;color:var(--muted);font-size:11px}.date-filter-group input{display:block;margin-top:5px}.filter-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;padding-top:2px}.empty-filter{padding:24px;text-align:center;color:var(--muted)}.customer-order-link{border:0;background:transparent;padding:0;color:#126ee8;font:inherit;font-weight:700;cursor:pointer;text-decoration:underline;text-decoration-color:#b9d5fb;text-underline-offset:3px}.customer-focus{display:grid;grid-template-columns:1.2fr .7fr 1fr 1.25fr auto;align-items:center;gap:12px;margin:13px 16px 0;padding:13px 15px;border:1px solid #bdd8ff;border-radius:9px;background:#f4f8ff}.customer-focus div span,.customer-focus div b{display:block}.customer-focus div span{color:var(--muted);font-size:10px;margin-bottom:4px}.customer-focus div b{font-size:12px}.customer-focus em{color:#dc7d18;font-style:normal}.customer-focus button{border:1px solid #bdd8ff;border-radius:7px;background:#fff;color:#1677ff;padding:8px 10px;font-weight:700;white-space:nowrap}@media(max-width:850px){.sales-filter-popover{right:auto;left:0;grid-template-columns:1fr}.filter-actions{grid-column:auto}.customer-focus{grid-template-columns:1fr 1fr}.customer-focus button{grid-column:1/-1}.sales-record-filters{flex-wrap:wrap}.sales-record-filters>input{min-width:100%}}
.sales-payment-columns{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:14px;padding:16px;background:#f4f6f9}.sales-payment-column{min-width:0;overflow:hidden;border:1px solid #e0e5eb;border-radius:11px;background:#fff}.due-column{border-color:#efd6a1}.sales-column-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #e8ebef}.due-column .sales-column-head{background:#fff9ec}.paid-column .sales-column-head{background:#f2fbf7}.sales-column-head span{display:block;margin-bottom:2px;color:var(--muted);font-size:10px}.sales-column-head h3{margin:0;font-size:17px}.sales-column-head>b{font-size:11px;color:#566170}.due-column .sales-column-head>b{color:#d17a10}.sales-simple-list{max-height:540px;overflow:auto}.sales-simple-card{display:grid;grid-template-columns:minmax(155px,1.45fr) minmax(90px,.8fr) minmax(100px,.9fr) auto;gap:12px;align-items:center;padding:13px 15px;border-bottom:1px solid #edf0f3}.sales-simple-card:last-child{border-bottom:0}.sales-simple-card:hover{background:#fafbfd}.sales-card-main small,.sales-card-money span,.sales-card-money small{display:block}.sales-card-main small{margin-top:5px;color:var(--muted);font-size:9px}.sales-card-money span{margin-bottom:4px;color:var(--muted);font-size:9px}.sales-card-money b{font-size:12px}.sales-card-money small{margin-top:3px;color:#738094;font-size:9px}.due-money b{color:#e47d0a}.paid-money b{color:#079765}.sales-card-actions{display:flex;align-items:center;gap:6px}.sales-card-actions button{white-space:nowrap}.empty-sales-column{padding:42px 15px;text-align:center;color:var(--muted);font-size:11px}@media(max-width:1050px){.sales-payment-columns{grid-template-columns:1fr}.sales-simple-list{max-height:420px}}@media(max-width:650px){.sales-payment-columns{padding:10px;gap:10px}.sales-simple-card{grid-template-columns:1fr auto;gap:9px;padding:12px}.sales-card-main{grid-column:1/-1}.sales-card-actions{justify-content:flex-end}.sales-column-head{padding:12px}.sales-column-head>b{max-width:58%;text-align:right}}
.sales-customer-card{width:100%;display:grid;grid-template-columns:minmax(145px,1.35fr) minmax(52px,.45fr) minmax(95px,.8fr) minmax(95px,.8fr) auto;align-items:center;gap:12px;padding:14px 15px;border:0;border-bottom:1px solid #edf0f3;background:#fff;color:inherit;text-align:left;cursor:pointer}.sales-customer-card:hover{background:#f8fbff}.sales-customer-card:last-child{border-bottom:0}.sales-customer-name b,.sales-customer-name small,.sales-customer-stat span,.sales-customer-stat b{display:block}.sales-customer-name b{color:#126ee8;font-size:13px}.sales-customer-name small{margin-top:5px;color:var(--muted);font-size:9px}.sales-customer-stat span{margin-bottom:4px;color:var(--muted);font-size:9px}.sales-customer-stat b{font-size:12px}.sales-customer-open{color:#126ee8;font-size:11px;font-weight:700;white-space:nowrap}@media(max-width:650px){.sales-customer-card{grid-template-columns:1fr 1fr;gap:9px 12px}.sales-customer-name{grid-column:1/-1}.sales-customer-open{grid-column:1/-1;text-align:right}.sales-customer-stat:nth-of-type(2){display:none}}
.sales-edit-card{width:min(1020px,96vw);max-height:94vh}.sales-edit-items-head{display:flex;align-items:center;justify-content:space-between;padding-top:4px}.sales-edit-items{overflow:auto;border:1px solid #e1e6ec;border-radius:8px}.sales-edit-item{display:grid;grid-template-columns:minmax(190px,1.7fr) minmax(130px,1.1fr) 70px 78px 105px 38px;gap:7px;padding:8px;border-bottom:1px solid #edf0f3}.sales-edit-item:last-child{border-bottom:0}.sales-edit-item input{margin:0!important;padding:9px!important}.sales-edit-item button{border:0;border-radius:6px;background:#fff0f0;color:#e24b4b;font-weight:800;cursor:pointer}@media(max-width:760px){.sales-edit-card .product-edit-form{display:block}.sales-edit-card .product-edit-form>label{display:block;margin-bottom:12px}.sales-edit-items-head{margin:5px 0 8px}.sales-edit-item{grid-template-columns:1fr 1fr}.sales-edit-item input:first-child{grid-column:1/-1}.sales-edit-item button{min-height:38px}.sales-edit-card .modal-actions{margin-top:12px}}
.clickable-metric{cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}.clickable-metric:hover{transform:translateY(-2px);box-shadow:0 8px 22px #19263a16}.payment-proof-field{grid-column:1/-1}.payment-proof-field small{color:var(--muted)}.payment-proof-link{color:#1677ff;font-weight:700;text-decoration:none}.today-payments-content{padding:18px}.today-payments-total{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;padding:14px;border-radius:9px;background:#f2f8ff}.today-payments-total span{color:var(--muted)}.today-payments-total b{font-size:20px;color:#1677ff}.today-payment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 4px;border-bottom:1px solid var(--line)}.today-payment-row b,.today-payment-row small,.today-payment-row a{display:block}.today-payment-row small{margin-top:4px;color:var(--muted)}.today-payment-row>div:last-child{text-align:right}.today-payment-row strong{display:block;margin-bottom:5px;color:#078458;font-size:15px}@media(max-width:600px){.today-payment-row{align-items:flex-start}.today-payment-row>div:last-child{min-width:100px}}
.discount-settle-option{grid-column:1/-1!important;display:flex!important;flex-direction:row!important;align-items:flex-start;gap:11px!important;padding:13px;border:1px solid #e6c96f;border-radius:10px;background:#fff9e8;color:var(--text)!important}.discount-settle-option input{width:18px!important;height:18px;margin:2px 0 0;padding:0;accent-color:#dca72f}.discount-settle-option span{display:block}.discount-settle-option b,.discount-settle-option small{display:block}.discount-settle-option b{font-size:13px}.discount-settle-option small{margin-top:5px;color:var(--muted);line-height:1.5}.payment-discount-preview{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:12px 13px;border:1px solid #f0d7a0;border-radius:9px;background:#fffaf0}.payment-discount-preview.hidden{display:none}.payment-discount-preview span{color:var(--muted);font-size:11px}.payment-discount-preview b{color:#c66d0c;font-size:17px}
.delivery-report-head{display:grid;grid-template-columns:90px 1fr 210px;align-items:center;gap:18px;border-bottom:3px solid #172235;padding-bottom:18px}.delivery-report-logo{width:72px;height:62px;display:grid;place-items:center;border:5px solid #149dc6;color:#087ea5;font-size:27px;font-weight:900}.delivery-report-head span{font-size:15px;font-weight:700}.delivery-report-head h1{margin:4px 0 0;font-size:34px;letter-spacing:4px}.delivery-place-badge{padding:14px 18px;border-radius:9px;background:linear-gradient(135deg,#172235,#df9025);color:#fff;text-align:center}.delivery-place-badge small,.delivery-place-badge b{display:block}.delivery-place-badge b{margin-top:6px;font-size:24px}.delivery-report-meta{display:flex;justify-content:space-between;margin:18px 0;font-size:15px}.delivery-customer-focus,.delivery-item-focus{border:2px solid #172235;border-radius:10px;padding:20px 24px;margin:16px 0}.delivery-customer-focus small,.delivery-item-focus small{display:block;color:#697689;font-weight:700}.delivery-customer-focus strong{display:block;margin:8px 0;font-size:34px}.delivery-item-focus{border-color:#dda52d;background:#fffaf0}.delivery-item-focus strong{display:block;margin:9px 0 14px;font-size:32px}.delivery-item-focus div{display:flex;justify-content:space-between;font-size:17px}.delivery-item-focus div b{font-size:24px}.delivery-address-block,.delivery-note-block{margin-top:16px;padding:16px 18px;background:#f6f8fb;border-radius:8px}.delivery-map-link{display:inline-block;color:#1677ff;font-weight:700}.delivery-signatures{display:flex;justify-content:space-between;margin-top:70px;font-size:16px}@media print{#delivery-report-modal:not(.hidden){display:block!important;position:static;background:#fff;padding:0}#delivery-report-modal .invoice-toolbar{display:none!important}#delivery-report-modal .invoice-shell{width:100%;margin:0}#delivery-report-paper{display:block!important;box-shadow:none;padding:10mm 8mm;min-height:0}}
.delivery-actions button.danger{border-color:#f3b9b9;color:#d63d3d;background:#fff7f7}.operation-log-panel{margin-top:18px}.operation-log-panel .list-head input{width:min(360px,45vw);border:1px solid var(--line);border-radius:8px;padding:10px 12px}.operation-log-panel table{min-width:980px}.operation-log-panel td:last-child{max-width:360px}
.courier-report-panel{margin-top:18px}.courier-month-picker{display:flex;align-items:center;gap:9px;color:var(--muted);font-size:12px}.courier-month-picker input{border:1px solid var(--line);border-radius:8px;padding:9px 11px}.courier-report-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;padding:0 18px 16px}.courier-report-summary article{border:1px solid #dce5f0;border-radius:10px;background:#f8fbff;padding:14px}.courier-report-summary span,.courier-report-summary b,.courier-report-summary small{display:block}.courier-report-summary span{font-weight:800}.courier-report-summary b{font-size:22px;color:#dc7d18;margin:7px 0}.courier-report-summary small{color:var(--muted)}.courier-report-panel table{min-width:1100px}.courier-report-panel td small{display:block;margin-top:4px;color:var(--muted)}.red-text{color:#db3e3e}
.delivery-items-editor{border:1px solid #dce2e9;border-radius:9px;padding:13px;background:#f8fafc}.delivery-items-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.delivery-items-title b,.delivery-items-title small{display:block}.delivery-items-title b{color:var(--text);font-size:14px}.delivery-items-title small{margin-top:3px;color:var(--muted);font-size:11px}.delivery-items-title button{border:1px solid #dce2e9;border-radius:7px;background:#fff;padding:8px 12px;font-weight:700}.delivery-items-scroll{overflow:auto}.delivery-items-editor table{width:100%;border-collapse:collapse}.delivery-items-editor th{padding:7px 6px;text-align:left;color:var(--muted);font-size:11px}.delivery-items-editor td{padding:6px}.delivery-items-editor select,.delivery-items-editor input{margin:0!important;min-width:110px}.delivery-items-editor select{min-width:270px}.delivery-item-subtotal{white-space:nowrap;font-weight:800;color:var(--text)}.delivery-remove-item{border:0;background:#fff0f0;color:#d63c3c;border-radius:6px;padding:8px 10px;font-weight:800}.delivery-report-products{display:block!important;margin-top:12px}.delivery-report-products table{width:100%;border-collapse:collapse;table-layout:fixed}.delivery-report-products th{padding:9px 12px;background:#fff3d8;color:#6b7280;font-size:14px;text-align:left;border-bottom:2px solid #dda52d}.delivery-report-products td{padding:14px 12px;border-bottom:1px solid #ead9af;vertical-align:middle;line-height:1.35}.delivery-report-products tbody tr:last-child td{border-bottom:0}.delivery-report-products th:first-child,.delivery-product-index{width:58px;text-align:center!important}.delivery-report-products th:nth-child(3),.delivery-product-spec{width:28%}.delivery-report-products th:last-child,.delivery-product-quantity{width:90px;text-align:center!important}.delivery-product-name{font-weight:900;color:#111827;overflow-wrap:anywhere}.delivery-product-name.name-short{font-size:24px}.delivery-product-name.name-medium{font-size:21px}.delivery-product-name.name-long{font-size:18px}.delivery-product-name.name-xlong{font-size:16px}.delivery-product-spec{font-size:16px;font-weight:700;color:#64748b;overflow-wrap:anywhere}.delivery-product-quantity{font-size:26px;font-weight:900;color:#111827}@media(max-width:700px){.delivery-items-editor select{min-width:220px}.delivery-items-title{align-items:flex-start}.delivery-items-title button{white-space:nowrap}.delivery-report-products th:nth-child(3),.delivery-product-spec{width:24%}.delivery-product-name.name-short{font-size:20px}.delivery-product-name.name-medium{font-size:18px}.delivery-product-name.name-long{font-size:16px}.delivery-product-name.name-xlong{font-size:14px}.delivery-product-quantity{font-size:22px}}
.delivery-product-picker{position:relative;min-width:270px}.delivery-product-results{position:absolute;z-index:30;top:calc(100% + 4px);left:0;right:0;max-height:260px;overflow:auto;border:1px solid #cfd7e2;border-radius:8px;background:#fff;box-shadow:0 12px 30px rgba(15,31,52,.16);padding:5px}.delivery-product-results button{display:block;width:100%;border:0;background:#fff;padding:10px 11px;text-align:left;color:var(--text);font-size:14px;border-radius:6px}.delivery-product-results button:hover,.delivery-product-results button:focus{background:#eef5ff;color:#0867dc}.delivery-product-empty{padding:12px;color:var(--muted);font-size:13px}.delivery-items-scroll{overflow:visible}.delivery-items-editor select{min-width:0}@media(max-width:700px){.delivery-product-picker{min-width:210px}}
.delivery-product-results button b,.delivery-product-results button small{display:block}.delivery-product-results button small{margin-top:3px;color:#788598;font-size:12px}
.customer-focus .customer-focus-back{order:-1;border-color:#1677ff;background:#1677ff;color:#fff;font-size:13px;box-shadow:0 4px 10px #1677ff26}.customer-focus .customer-focus-back:hover{background:#0f67dc}
@media screen and (min-width:801px){
  #delivery-report-modal .invoice-shell{width:min(920px,92vw)}
  #delivery-report-paper{min-height:620px;padding:24px 30px 26px}
  #delivery-report-paper .delivery-report-head{grid-template-columns:72px 1fr 170px;gap:14px;padding-bottom:12px}
  #delivery-report-paper .delivery-report-logo{width:58px;height:50px;border-width:4px;font-size:22px}
  #delivery-report-paper .delivery-report-head h1{font-size:28px;letter-spacing:3px}
  #delivery-report-paper .delivery-place-badge{padding:10px 14px}
  #delivery-report-paper .delivery-place-badge b{font-size:20px}
  #delivery-report-paper .delivery-report-meta{margin:12px 0;font-size:14px}
  #delivery-report-paper .delivery-customer-focus,#delivery-report-paper .delivery-item-focus{margin:11px 0;padding:14px 18px}
  #delivery-report-paper .delivery-customer-focus strong{margin:5px 0;font-size:27px}
  #delivery-report-paper .delivery-customer-focus p{margin:5px 0}
  #delivery-report-paper .delivery-report-products td{padding:10px}
  #delivery-report-paper .delivery-product-name.name-short{font-size:20px}
  #delivery-report-paper .delivery-product-name.name-medium{font-size:18px}
  #delivery-report-paper .delivery-product-name.name-long{font-size:16px}
  #delivery-report-paper .delivery-product-name.name-xlong{font-size:14px}
  #delivery-report-paper .delivery-product-spec{font-size:14px}
  #delivery-report-paper .delivery-product-quantity{font-size:22px}
  #delivery-report-paper .delivery-address-block,#delivery-report-paper .delivery-note-block{margin-top:11px;padding:11px 14px}
  #delivery-report-paper .delivery-signatures{margin-top:38px;font-size:14px}
}
.invoice-logo{width:76px!important;height:68px!important;display:block!important;margin:auto!important;border:0!important;clip-path:none!important;object-fit:contain!important}
.delivery-report-logo{width:76px!important;height:68px!important;border:0!important;clip-path:none!important;color:transparent!important;font-size:0!important;background:#fff url("assets/jk-logo.jpg") center/contain no-repeat!important}
.brand-mark{width:52px!important;height:52px!important;border:0!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important}.brand-mark img{width:100%;height:100%;display:block;object-fit:contain}.invoice-logo{width:96px!important;height:86px!important}.delivery-report-logo{width:92px!important;height:82px!important}
.inventory-row-actions{display:flex;gap:6px;align-items:center;white-space:nowrap}.stocktake-row-btn{border:1px solid #e1bb5c;border-radius:6px;background:#fff8e7;color:#956810;padding:6px 9px;font-size:10px;font-weight:700}
.delivery-map-link{text-decoration:underline}.delivery-navigation-line{display:grid;gap:5px;margin-top:8px}.delivery-navigation-line span{color:#334155;font-weight:700}.delivery-navigation-line small{color:#64748b;font-size:10px;overflow-wrap:anywhere;word-break:break-all}@media print{.delivery-navigation-line small{display:block!important;color:#4b5563;font-size:8px}.delivery-map-link{color:#145fb8!important}}
.manual-sales-product{display:flex;gap:9px;align-items:center;margin:4px 0 14px}.manual-sales-product select,.manual-sales-product input{border:1px solid #dfe3e9;border-radius:7px;padding:10px 12px;font:inherit;background:#fff}.manual-sales-product select{width:165px}.manual-sales-product input{flex:1;min-width:220px}.manual-sales-product button{white-space:nowrap}.sales-product-remove{border:0;border-radius:6px;background:#fff0f0;color:#df4242;padding:7px 10px;font-weight:800;cursor:pointer}@media(max-width:650px){.manual-sales-product{display:block}.manual-sales-product select,.manual-sales-product input,.manual-sales-product button{width:100%;margin-top:8px}}
.language-toggle{min-width:42px;height:34px;border:1px solid #d8dde5;border-radius:8px;background:#fff;color:#172235;font-weight:800}.language-toggle:hover{border-color:var(--gold);color:#9b7018}.customer-language-toggle{float:right}.customer-portal-mode .header-actions .language-toggle{display:none}
.report-analysis-menu{display:grid;grid-template-columns:165px 1fr;gap:16px;align-items:center;margin-bottom:14px;padding:14px 16px}.report-analysis-menu>div b,.report-analysis-menu>div small{display:block}.report-analysis-menu>div small{margin-top:4px;color:var(--muted);font-size:10px}.report-analysis-menu nav{display:flex;flex-wrap:wrap;gap:7px}.report-analysis-menu button{padding:7px 10px;border:1px solid #dfe3e9;border-radius:7px;background:#fff;color:#445166;font-size:11px}.report-analysis-menu button:hover,.report-analysis-menu button.active{border-color:#b9d4ff;background:#edf5ff;color:#126ee8;font-weight:700}@media(max-width:900px){.report-analysis-menu{grid-template-columns:1fr}}
.settings-form select{width:100%;border:1px solid #dfe3e9;background:#fff;border-radius:6px;padding:10px}.settings-data-note{margin:0;padding:10px;border-radius:7px;background:#fff8e9;color:#8a6414;font-size:11px;line-height:1.6}
.stocktake-voice{display:flex;align-items:center;gap:10px}.stocktake-voice button{flex:0 0 auto}.stocktake-voice button.listening{border-color:#ef5252;background:#fff0f0;color:#d73737}.stocktake-voice span{color:var(--muted);font-size:11px;line-height:1.5}
.header-icon-button{display:inline-flex;align-items:center;justify-content:center;gap:6px}.header-button-icon{display:inline-grid;place-items:center;width:18px;height:18px}.header-button-icon svg,.notification-type-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.notification-wrap{position:relative}.notification-panel{position:absolute;top:46px;right:0;width:360px;border:1px solid #dfe3e9;border-radius:12px;background:#fff;box-shadow:0 18px 50px #1018272b;overflow:hidden;z-index:30}.notification-head{display:flex!important;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}.notification-head b,.notification-head small{display:block!important}.notification-head small{margin-top:3px;color:var(--muted);font-size:10px}.notification-head button{border:0;background:#f3f5f8;border-radius:6px;width:28px;height:28px;font-size:18px}.notification-list{max-height:390px;overflow:auto}.notification-item{width:100%;display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:13px 15px;border:0;border-bottom:1px solid var(--line);background:#fff;text-align:left}.notification-item:hover{background:#f8fbff}.notification-item>span{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#edf5ff;color:#126ee8;padding:7px}.notification-type-icon.inventory{background:#fff4d8;color:#a97711}.notification-type-icon.finance{background:#e6f8f1;color:#099961}.notification-type-icon.migration{background:#f0eaff;color:#7256ce}.notification-item b,.notification-item small{display:block}.notification-item small{margin-top:3px;color:var(--muted);font-size:10px}.notification-item em{color:#126ee8;font-style:normal;font-size:11px}.notification-empty{padding:35px 18px;text-align:center;color:var(--muted)}.notification-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}.notification-refresh,.notification-clear{height:40px;border:0;background:#f8fafc}.notification-refresh{color:#126ee8}.notification-clear{border-left:1px solid var(--line);color:#d14343}.header-actions .ghost i.notification-zero{display:none}@media(max-width:600px){.notification-panel{position:fixed;top:72px;right:10px;left:10px;width:auto}}
.mobile-menu-toggle,.mobile-nav-backdrop{display:none}

/* 桌面侧栏在较矮屏幕上独立滚动，避免底部状态与系统设置重叠 */
@media(min-width:761px){.sidebar{display:flex;flex-direction:column;overflow:hidden}.sidebar nav{flex:1;min-height:0;overflow-y:auto;padding-right:3px}.sidebar-foot{position:static;flex:0 0 auto;margin-top:8px;padding:9px 14px}.sidebar nav::-webkit-scrollbar{width:5px}.sidebar nav::-webkit-scrollbar-thumb{background:#344158;border-radius:6px}}
.nav-group{display:flex;flex-direction:column}.nav-parent{width:100%;position:relative}.nav-chevron{float:right;margin-top:2px;color:#738199;font-style:normal;transition:transform .18s}.nav-group.open .nav-chevron{transform:rotate(180deg)}.nav-submenu{display:none;gap:2px;padding:3px 0 5px 43px}.nav-group.open .nav-submenu{display:grid}.sales-subnav-item{position:relative;border:0;border-radius:6px;background:transparent;color:#8996a9;padding:7px 9px;text-align:left;font-size:12px}.sales-subnav-item:before{content:"";position:absolute;left:-13px;top:50%;width:7px;height:1px;background:#536177}.sales-subnav-item:hover,.sales-subnav-item.active{background:#1a2940;color:#fff}.sales-record-column{overflow:hidden;margin:0 16px 16px;border:1px solid #e0e5eb;border-radius:11px;background:#fff}.sales-record-column .sales-simple-list{max-height:none;overflow:visible}
.statement-btn{border:1px solid #b8d3f7;border-radius:7px;background:#eef5ff;color:#126ee8;padding:7px 10px;font-size:10px;font-weight:700;cursor:pointer}.statement-head{display:grid;grid-template-columns:190px 1fr 150px;align-items:center;padding-bottom:18px;border-bottom:3px solid #172235}.statement-head>div:first-child{display:flex;align-items:center;gap:10px}.statement-head img{width:58px;height:52px;object-fit:contain}.statement-head h1{margin:0;text-align:center;font-size:30px;letter-spacing:2px}.statement-head p{margin:5px 0 0;text-align:center;color:#64748b;font-size:12px}.statement-head>div:last-child{text-align:right}.statement-head span,.statement-head>div:last-child b{display:block}.statement-head span{color:#64748b;font-size:11px;margin-bottom:5px}.statement-customer{display:grid;grid-template-columns:1fr 1.25fr 2fr;gap:12px;margin:16px 0;padding:14px 16px;border-radius:8px;background:#f5f7fa}.statement-customer span,.statement-customer b{display:block}.statement-customer span{margin-bottom:5px;color:#64748b;font-size:10px}.statement-due{color:#c56d08!important;font-weight:800}.statement-order{margin-top:18px;border:1px solid #cfd6df;border-radius:9px;overflow:hidden}.statement-order-head{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;padding:12px 15px;background:#f3f6fa;border-bottom:1px solid #cfd6df}.statement-order-head>div:last-child{text-align:right}.statement-order-head span,.statement-order-head b{display:block}.statement-order-head span{margin-bottom:4px;color:#64748b;font-size:10px}.statement-order-head b{font-size:14px}.statement-detail-table{width:100%;margin:0}.statement-detail-table th,.statement-detail-table td{border-top:0;border-left:0}.statement-detail-table th:last-child,.statement-detail-table td:last-child{border-right:0}.statement-detail-table tbody tr:last-child td{border-bottom:0}.statement-order-payment{display:flex;justify-content:flex-end;gap:30px;padding:10px 15px;border-top:1px solid #cfd6df;background:#fffaf0;font-size:12px}.statement-order-payment b{margin-left:4px}.statement-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:18px}.statement-summary>div{padding:13px;border:1px solid #dfe4ea;border-radius:8px}.statement-summary span,.statement-summary b{display:block}.statement-summary span{margin-bottom:6px;color:#64748b;font-size:10px}.statement-summary b{font-size:16px}.statement-summary .statement-total-due{border-color:#e5bd61;background:#fff8e7}.statement-total-due b{color:#bc6f0c;font-size:20px}@media print{.statement-order{break-inside:avoid}.statement-order-next{break-before:page}.statement-order-next .statement-order-head{margin-top:4mm}}@media(max-width:800px){.statement-head{grid-template-columns:180px 1fr 140px}.statement-customer{grid-template-columns:1fr 1fr}.statement-customer>div:last-child{grid-column:1/-1}}
.operating-expense-panel{margin-top:16px}.operating-expense-form{display:grid;grid-template-columns:130px 150px minmax(220px,1fr) 150px 130px auto;gap:10px;align-items:end;padding:16px;border-bottom:1px solid var(--line)}.operating-expense-form label{margin:0}.operating-expense-form input,.operating-expense-form select,.expense-list-toolbar input,.expense-list-toolbar select{width:100%;height:40px;border:1px solid #dfe3e9;border-radius:7px;background:#fff;padding:0 10px;font:inherit}.operating-expense-form button{height:40px;white-space:nowrap}.expense-form-actions{display:flex;gap:6px}.expense-form-actions button{flex:1}.expense-list-toolbar{display:flex;gap:14px;align-items:end;justify-content:space-between;padding:12px 16px 6px}.expense-filters{display:flex;gap:9px;align-items:end;flex-wrap:wrap}.expense-filters label{margin:0;min-width:145px}.expense-filters label:nth-child(4){min-width:240px}.expense-filters button{height:40px;white-space:nowrap}.expense-list-toolbar span{color:var(--muted);font-size:12px;white-space:nowrap}.expense-row-actions{display:flex;gap:6px}.expense-edit{border:1px solid #b9d7ff;border-radius:6px;background:#f3f8ff;color:#176fd3;padding:6px 9px}.expense-delete{border:1px solid #ffc6c6;border-radius:6px;background:#fff6f6;color:#e64242;padding:6px 9px}.release-notes-overlay{position:fixed;inset:0;z-index:999996;background:#07101dcc;display:grid;place-items:center;padding:18px}.release-notes-card{width:min(570px,96vw);background:#fff;border-radius:16px;box-shadow:0 24px 80px #0007;overflow:hidden}.release-notes-head{padding:23px 25px;background:linear-gradient(135deg,#13233d,#1e3559);color:#fff}.release-notes-head small{color:#e1b340;font-weight:800}.release-notes-head h2{margin:6px 0 0}.release-notes-body{padding:20px 25px;color:#243248}.release-notes-body ul{margin:0;padding-left:22px;line-height:1.9}.release-notes-actions{text-align:right;padding:0 25px 22px}.release-notes-actions button{border:0;border-radius:9px;background:#dfa928;padding:11px 22px;font-weight:800;cursor:pointer}@media(max-width:1100px){.operating-expense-form{grid-template-columns:1fr 1fr 1fr}.operating-expense-form label:nth-child(3){grid-column:span 2}}@media(max-width:650px){.operating-expense-form{grid-template-columns:1fr}.operating-expense-form label:nth-child(3){grid-column:auto}.expense-list-toolbar{align-items:stretch;flex-direction:column}.expense-filters{display:grid;grid-template-columns:1fr 1fr}.expense-filters label,.expense-filters label:nth-child(4){min-width:0}.expense-filters label:nth-child(4){grid-column:1/-1}.expense-filters button{grid-column:1/-1}.nav-submenu{padding-left:38px}}
@media(max-width:760px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}body.mobile-nav-open{overflow:hidden}
  .customer-portal-mode .sidebar,.customer-portal-mode .mobile-menu-toggle,.customer-portal-mode .mobile-nav-backdrop{display:none!important}
  .sidebar{display:block!important;width:min(290px,82vw);padding:18px 14px;transform:translateX(-105%);transition:transform .22s ease;z-index:50;overflow-y:auto}.mobile-nav-open .sidebar{transform:translateX(0)}.sidebar .brand{padding-bottom:16px}.sidebar nav{padding-top:13px}.sidebar-foot{position:static;margin-top:15px}.mobile-nav-backdrop{display:block;position:fixed;inset:0;border:0;background:#07101db3;z-index:49}.mobile-menu-toggle{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid #dce2e9;border-radius:9px;background:#fff;color:#172235;font-size:21px}
  main{margin-left:0!important;width:100%;min-width:0}header{height:68px;padding:0 12px;gap:10px}header>div:nth-of-type(1){min-width:0;flex:1}header h1{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header p{display:none}.header-actions{gap:6px}.header-actions>.avatar,.header-actions>div:last-child{display:none}.language-toggle{min-width:38px;height:36px}.header-actions .header-icon-button{position:relative;width:38px;height:38px;padding:0;border:1px solid #e4e7ec;background:#f8f9fb;color:#172235;border-radius:10px;font-size:0}.header-actions .header-button-icon{width:19px;height:19px}.header-actions .header-icon-button i{position:absolute;top:-5px;right:-5px;min-width:18px;line-height:16px;padding:0 4px;font-size:9px;text-align:center}.header-actions .header-user-button{color:#1677ff;background:#eef5ff}.header-actions .header-logout-button{color:#d14343;background:#fff1f1}.notification-panel{top:62px}
  .page{width:100%;padding:14px 10px 35px}.page-toolbar{align-items:stretch;flex-wrap:wrap}.page-toolbar>div:first-child{width:100%;flex-basis:100%}.page-toolbar>button{flex:1;min-width:120px}.quick-order{padding:17px 14px}.quick-head{align-items:flex-start}.quick-head h2{font-size:16px}.quick-box,.quick-box.compact{display:block}.quick-box input{width:100%;height:46px}.quick-box button{width:100%;height:43px;margin-top:8px}.dashboard-smart-actions{grid-template-columns:1fr!important}.dashboard-smart-card{min-width:0;padding:17px 14px}.compact-overview,.receivable-overview{grid-template-columns:1fr!important}.dashboard-fx{grid-column:auto}.inventory-alert-banner{grid-template-columns:42px 1fr!important}.inventory-alert-stats{grid-column:1/-1}.inventory-alert-stats button{min-width:0;padding:9px 4px}.metrics,.sub-metrics,.report-cards,.contact-summary,.import-metrics,.migration-batches,.import-steps{grid-template-columns:1fr 1fr!important}.dashboard-grid,.lower,.finance-grid,.contact-grid,.report-detail-grid,.report-settings-grid,.stocktake-grid,.order-bottom{grid-template-columns:1fr!important}.form-grid{grid-template-columns:1fr!important}.filters,.list-head{display:flex!important;flex-direction:column;align-items:stretch!important}.filters>*{width:100%!important}.sales-currency-switch{width:100%;grid-template-columns:1fr 1fr}.sales-currency-switch>span,.sales-currency-switch small{grid-column:1/-1}.currency-picker{width:100%}.order-panel{padding:14px 10px}.manual-sales-product{display:block}.manual-sales-product select,.manual-sales-product input,.manual-sales-product button{width:100%;min-width:0;margin-top:8px}.contact-table-wrap,.import-table-wrap,.delivery-items-scroll{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.contact-table-wrap table{min-width:760px}.report-filter-bar{width:100%;display:grid;grid-template-columns:1fr 1fr;align-items:end}.report-filter-bar>span{display:none}.report-filter-bar label:first-child{grid-column:1/-1}.report-filter-bar button{width:100%}.report-analysis-menu{padding:12px}.report-analysis-menu nav{display:grid;grid-template-columns:1fr 1fr}.report-analysis-menu button{min-height:40px}.modal-card,.product-edit-card,.stocktake-card{width:100vw!important;max-width:100vw}.modal-head{padding:15px}.product-edit-form,.stocktake-grid{padding:14px}.detail-summary{grid-template-columns:1fr 1fr;padding:12px}.detail-section{margin:0 10px 12px}.detail-products{min-width:620px}.invoice-toolbar{flex-wrap:wrap}.preorder-card{grid-template-columns:1fr}.preorder-actions{flex-wrap:wrap}.toast{left:12px;right:12px;bottom:15px;text-align:center}.customer-order-page{padding:12px}.customer-order-shell{padding:17px;border-radius:12px}
}
@media(max-width:430px){.metrics,.sub-metrics,.report-cards,.contact-summary,.import-metrics,.migration-batches,.import-steps{grid-template-columns:1fr!important}.report-analysis-menu nav,.report-filter-bar{grid-template-columns:1fr}.detail-summary{grid-template-columns:1fr}.notification-item{grid-template-columns:32px 1fr}.notification-item em{display:none}}

/* 销售记录使用统一栏宽，避免每行因操作按钮数量不同而错位 */
@media(min-width:1251px){.sales-record-column .sales-simple-card{grid-template-columns:minmax(240px,1fr) 190px 190px 360px}.sales-record-column .sales-card-actions{width:360px;justify-content:flex-end;flex-wrap:wrap}}
@media(min-width:651px) and (max-width:1250px){.sales-record-column .sales-simple-card{grid-template-columns:minmax(220px,1fr) 150px 150px}.sales-record-column .sales-card-actions{grid-column:1/-1;justify-content:flex-end;flex-wrap:wrap}}
@media(max-width:650px){.sales-record-column .sales-simple-card{grid-template-columns:1fr 1fr}.sales-record-column .sales-card-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:7px}.sales-record-column .sales-card-actions button{min-height:38px;width:100%}}

/* 当前版本号在桌面及手机版顶部保持可见 */
.page-title-line{display:flex;align-items:center;gap:8px;min-width:0}.page-title-line h1{margin-bottom:0}.app-version{display:inline-flex;align-items:center;flex:0 0 auto;min-height:22px;padding:2px 8px;border:1px solid #ead291;border-radius:999px;background:#fff8e3;color:#956a0d;font-size:11px;font-weight:800;line-height:1}

/* 更新说明固定在屏幕内，正文独立滚动，操作按钮始终可见 */
.release-notes-card{display:flex;flex-direction:column;max-height:calc(100dvh - 36px)}
.release-notes-head{position:relative;flex:0 0 auto;padding-right:64px}
.release-notes-close{position:absolute;top:14px;right:14px;width:38px;height:38px;border:1px solid #ffffff55;border-radius:50%;background:#ffffff18;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.release-notes-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.release-notes-actions{flex:0 0 auto;padding-top:14px;background:#fff;border-top:1px solid #e5eaf1}
@media(max-width:650px){.release-notes-overlay{place-items:stretch center;padding:10px}.release-notes-card{width:100%;max-height:calc(100dvh - 20px);border-radius:14px}.release-notes-head{padding:17px 58px 15px 18px}.release-notes-head h2{font-size:20px;line-height:1.3}.release-notes-body{padding:16px 18px;font-size:15px}.release-notes-body ul{padding-left:20px;line-height:1.6}.release-notes-actions{padding:12px 18px calc(12px + env(safe-area-inset-bottom))}.release-notes-actions button{width:100%;min-height:46px}.release-notes-close{top:11px;right:11px}}

/* 手机端弹窗与表单完整收进屏幕，不需要手动缩放 */
@media(max-width:650px){html,body{width:100%;max-width:100%;overflow-x:hidden}.order-modal{width:100%;max-width:100%;padding:0;align-items:stretch;overflow:hidden}.order-modal>.modal-card{width:100%!important;max-width:100%!important;min-width:0;height:100dvh;max-height:100dvh;display:flex;flex-direction:column;overflow:hidden}.order-modal .modal-head{position:sticky;top:0;flex:0 0 auto;width:100%;padding:13px 14px}.order-modal .modal-head h2{font-size:18px}.order-modal .modal-head button{flex:0 0 38px;width:38px;height:38px}.order-modal .product-edit-form,.order-modal .purchase-payment-content,.order-modal #detail-content{flex:1 1 auto;min-height:0;width:100%;min-width:0;max-width:100%;overflow-y:auto;overflow-x:hidden;padding:13px 12px calc(84px + env(safe-area-inset-bottom))}.order-modal .product-edit-form>*{min-width:0;max-width:100%}.order-modal label{width:100%;min-width:0;font-size:13px}.order-modal input,.order-modal select,.order-modal textarea{width:100%!important;max-width:100%;min-width:0;font-size:16px}.order-modal .modal-actions{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin-top:4px;padding:10px 0 calc(10px + env(safe-area-inset-bottom));background:#f5f7fa}.order-modal .modal-actions button{width:100%;min-width:0;min-height:44px}.delivery-items-editor{width:100%;min-width:0}.delivery-items-title{align-items:stretch;gap:8px;flex-direction:column}.delivery-items-title button{width:100%}.delivery-items-scroll{width:100%;max-width:100%;overflow-x:auto}.delivery-items-scroll table{min-width:560px}}

/* 整个 ERP 的手机版通用自适应保护 */
@media(max-width:650px){body,main,header,.page,.panel,.order-panel,.page-toolbar,.filters,.list-head,.dashboard-grid,.finance-grid,.contact-grid,.report-detail-grid,.report-settings-grid{min-width:0;max-width:100%}img,svg,canvas,video{max-width:100%;height:auto}input,select,textarea,button{max-width:100%}.panel,.order-panel{overflow:hidden}.table-wrap,.sales-record-wrap,.inventory-table-wrap,.purchase-table-wrap,.finance-table-wrap,.courier-report-panel,.statement-order{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.panel>table,.order-panel>table{display:block;width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.invoice-modal{width:100%;max-width:100%;padding:0;overflow-x:hidden}.invoice-modal .invoice-shell{width:100%!important;max-width:100%;margin:0}.invoice-modal .invoice-toolbar{position:sticky;top:0;z-index:4;width:100%;border-radius:0;padding:10px}.invoice-modal .invoice-paper{width:100%;max-width:100%;min-width:0;min-height:0;padding:18px 12px;overflow-x:auto}.invoice-head,.delivery-report-head,.statement-head{grid-template-columns:1fr!important;gap:10px;text-align:center}.invoice-head h1,.delivery-report-head h1,.statement-head h1{font-size:22px!important;letter-spacing:1px!important}.invoice-slogan,.delivery-place-badge{max-width:280px;width:100%;margin:auto}.invoice-info,.invoice-info-top,.statement-customer{grid-template-columns:1fr 1fr!important;gap:8px}.statement-head>div:first-child,.statement-head>div:last-child{justify-content:center;text-align:center}.statement-order-head{grid-template-columns:1fr 1fr}.statement-order-head>div:first-child{grid-column:1/-1}.statement-summary{grid-template-columns:1fr 1fr}.delivery-report-meta,.delivery-item-focus div,.delivery-signatures,.invoice-settlement{gap:10px;flex-wrap:wrap}.delivery-customer-focus strong,.delivery-item-focus strong{font-size:22px}.invoice-table,.statement-detail-table,.delivery-report-products table{min-width:560px}.notification-panel{max-width:calc(100vw - 20px)}.report-analysis-menu,.report-filter-bar,.expense-list-toolbar,.operating-expense-form{min-width:0;max-width:100%}}
.supplier-pay-all-btn{border:1px solid #e2b344;border-radius:7px;background:#fff8df;color:#8a6414;padding:7px 10px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}
.sales-customer-group{border-left:4px solid #dda52d}.sales-group-details{grid-column:1/-1;border-top:1px solid var(--line);padding:0 16px}.sales-group-details summary{cursor:pointer;color:#176fd3;font-weight:800;padding:12px 0}.sales-group-order{display:grid;grid-template-columns:minmax(210px,1.5fr) minmax(120px,.8fr) minmax(120px,.8fr) auto;gap:12px;align-items:center;padding:11px 0;border-top:1px solid #edf0f4}.sales-group-order b,.sales-group-order small{display:block}.sales-group-order small{color:var(--muted);margin-top:4px}.sales-group-order-actions{display:flex;gap:5px}@media(max-width:760px){.sales-group-order{grid-template-columns:1fr 1fr}.sales-group-order>div:first-child{grid-column:1/-1}.sales-group-order-actions{justify-content:flex-end}}
/* AI order voice input */
.quick-box .voice-input-btn{flex:0 0 auto;min-width:122px;border:1px solid #d7a83d;border-radius:8px;background:#fff8e7;color:#7b590d;padding:0 14px;font-weight:700;white-space:nowrap}
.quick-box .voice-input-btn:hover{background:#ffefc2}
.quick-box .voice-input-btn.listening{border-color:#ef5252;background:#ef5252;color:#fff;box-shadow:0 0 0 4px #ef525226}
.inquiry-product-action{display:flex;align-items:center;gap:10px;white-space:nowrap}.inquiry-product-action>b{color:#087e51}.inquiry-product-action button{border:1px solid #bfd5f2;border-radius:7px;background:#edf5ff;color:#126ee8;padding:7px 10px;font-weight:700}.inquiry-product-action button:disabled{border-color:#bfe4d2;background:#e8f7f0;color:#087e51;cursor:default}
.payment-qr-setting small{display:block;margin-top:7px;color:var(--muted)}#setting-payment-qr-preview{display:flex;align-items:center;gap:12px;margin-top:10px}#setting-payment-qr-preview img{width:90px;height:90px;border:1px solid var(--line);border-radius:8px;object-fit:contain}#setting-payment-qr-preview button{border:1px solid #efb6b6;border-radius:7px;background:#fff;color:#d33;padding:7px 10px}#setting-payment-qr-preview em{color:var(--muted);font-style:normal}.payment-qr-card{width:min(440px,94vw)}.payment-qr-content{padding:24px;text-align:center}.payment-qr-content>img{display:block;width:min(300px,78vw);height:min(300px,78vw);margin:0 auto 18px;border:1px solid var(--line);border-radius:14px;object-fit:contain;background:#fff}.payment-qr-timer{display:flex;align-items:baseline;justify-content:center;gap:7px;color:var(--muted)}.payment-qr-timer b{font-size:34px;color:#d58f12}.payment-qr-content>small{display:block;margin:10px 0 20px;color:var(--muted);line-height:1.6}.payment-qr-content .modal-actions{justify-content:center}
.customer-selected-products{margin:0 0 18px;padding:16px;border:1px solid #bcd7fa;border-radius:11px;background:#f5f9ff}.customer-selected-products>div:first-child{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.customer-selected-products>div:first-child span{color:#126ee8;font-weight:700}.customer-selected-products>small{display:block;margin-top:10px;color:var(--muted)}#customer-selected-list article{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid #dce8f7}#customer-selected-list article:last-child{border-bottom:0}#customer-selected-list strong,#customer-selected-list small{display:block}#customer-selected-list small{margin-top:3px;color:var(--muted)}.customer-selected-quantity{display:flex;align-items:center}.customer-selected-quantity button{width:34px;height:34px;border:1px solid #c7d8ee;background:#fff;color:#126ee8;font-size:18px}.customer-selected-quantity input{width:54px;height:34px;border:1px solid #c7d8ee;border-left:0;border-right:0;text-align:center;font:inherit;font-weight:700}.customer-selected-remove{border:0;background:transparent;color:#d33;padding:7px}@media(max-width:540px){#customer-selected-list article{grid-template-columns:1fr auto}.customer-selected-quantity{grid-row:1;grid-column:2}.customer-selected-remove{grid-column:1/-1;justify-self:end;padding:3px 7px}}
@media(max-width:760px){.quick-box .voice-input-btn{width:100%;height:43px;margin-top:8px}}
.screen-zoom-wrap{display:none;position:relative}.screen-fit-button{border:1px solid #dce2e9;border-radius:9px;background:#fff;color:#1677ff;font-weight:800}.screen-zoom-panel{position:absolute;top:46px;right:0;z-index:80;display:grid;grid-template-columns:42px 58px 42px;align-items:center;gap:6px;width:166px;padding:9px;border:1px solid #dce2e9;border-radius:11px;background:#fff;box-shadow:0 12px 34px #0c182b30}.screen-zoom-panel.hidden{display:none}.screen-zoom-panel button{height:38px;border:1px solid #d8e0ea;border-radius:8px;background:#f5f8fc;color:#176fd3;font-size:20px;font-weight:800}.screen-zoom-panel b{text-align:center;font-size:13px}.screen-zoom-panel .screen-zoom-reset{grid-column:1/-1;height:34px;font-size:12px;color:#4f5d70}
@media(max-width:1024px) and (pointer:coarse){.screen-zoom-wrap{display:block}.screen-fit-button{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:42px;height:38px;padding:0 7px}.screen-fit-button span{font-size:10px}}

/* V1.0.3：iPhone Safari 不再沿用放大后的桌面视图，全部弹窗锁定在可视屏幕内 */
@media(max-width:1024px) and (pointer:coarse){
  html,body{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important;-webkit-text-size-adjust:100%;text-size-adjust:100%}
  .order-modal{inset:0!important;width:100dvw!important;max-width:100dvw!important;height:100dvh!important;padding:0!important;overflow:hidden!important}
  .order-modal>.modal-card{width:100dvw!important;max-width:100dvw!important;min-width:0!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;overflow:hidden!important}
  .order-modal .product-edit-form{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-content:start!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;height:auto!important;padding:14px 14px calc(82px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important}
  .order-modal .product-edit-form>*,.order-modal .product-edit-form>.wide{grid-column:1!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .order-modal input,.order-modal select,.order-modal textarea{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;font-size:16px!important}
  .order-modal .modal-actions{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:30!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important;width:100dvw!important;max-width:100dvw!important;margin:0!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;box-sizing:border-box!important;background:#f5f7fa!important;border-top:1px solid #dfe4ea!important}
  .order-modal .modal-actions button{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
}
@media(max-width:1024px) and (pointer:coarse) and (orientation:landscape){
  .order-modal .modal-head{padding-top:8px!important;padding-bottom:8px!important}
  .order-modal .product-edit-form{padding-top:10px!important}
  .order-modal .modal-actions{padding-top:7px!important;padding-bottom:calc(7px + env(safe-area-inset-bottom))!important}
}
