:root{--side:#273d50;--side2:#203446;--teal:#16b8a6;--blue:#168bd1;--line:#e4e9ee;--muted:#77889a;--bg:#f5f6f8}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--bg);color:#35465a;font:14px/1.45 "Microsoft YaHei",Arial,sans-serif;display:flex}#sidebar{width:225px;flex:none;background:var(--side);color:#c8d2dc;min-height:100vh;box-shadow:2px 0 7px #1324352b}.side-brand{height:94px;padding:22px 26px;background:var(--side2);display:flex;align-items:center;gap:11px;color:#fff}.brand-logo{width:38px;height:38px;border:4px solid #1ec4b1;border-radius:50%;position:relative}.brand-logo:after{content:'';position:absolute;width:24px;height:11px;border:4px solid #1ec4b1;border-radius:50%;left:12px;top:9px}.side-brand b{font-size:21px;letter-spacing:.3px}.side-brand small{display:block;color:#9eb2c1;font-size:11px}.side-section{padding-top:8px}.side-group{padding:11px 25px;color:#e7eef4;font-weight:700;border-left:4px solid transparent;cursor:pointer}.side-group.active{background:#213647;border-left-color:var(--teal)}.side-sub{display:block;border:0;border-left:4px solid transparent;background:transparent;color:#b8c5d1;padding:8px 0 8px 60px;width:100%;text-align:left;cursor:pointer;font:inherit}.side-sub:hover,.side-sub.active{color:#fff;background:#213647;border-left-color:var(--teal)}.app-shell{min-width:0;flex:1}header{height:54px;padding:0 22px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px}.menu-icon{background:var(--teal);color:#fff;border:0;border-radius:3px;font-size:18px;padding:4px 10px}.crumb{color:#7a8896;flex:1}.toolbar{display:flex;gap:8px}button{border:1px solid #c7d2dc;background:#fff;border-radius:4px;padding:7px 12px;color:#42566b;font:inherit;cursor:pointer}button:hover{background:#eef7f8}.primary{background:var(--teal);color:#fff;border-color:var(--teal)}.danger{color:#c93845}#tabs{height:42px;background:#fff;border-bottom:1px solid var(--line);padding-left:22px;display:flex;align-items:stretch}.tab{border:0;border-radius:0;background:transparent;border-left:1px solid #eef1f4;padding:10px 17px;color:#687b8d}.tab.active{background:var(--side);color:#fff;font-weight:700}main{padding:18px 22px}.sheet-title{display:flex;align-items:baseline;gap:13px}.sheet-title h1{font-size:19px;color:#263b50;margin:0}.sheet-title span{font-size:12px;color:var(--muted)}.controls{margin:13px 0;min-height:33px;display:flex;gap:8px;align-items:center}.grid-wrap{background:#fff;border:1px solid var(--line);overflow:auto;min-height:310px}table{width:100%;border-collapse:collapse;white-space:nowrap}th{background:#f5f6f8;color:#556575;font-weight:700}th,td{border:1px solid #e5e9ed;padding:8px 10px;text-align:left}tbody tr:hover{background:#f4fbfa}.num{text-align:right}.muted{color:var(--muted)}.tag{border-radius:20px;padding:2px 7px;background:#e7f7f4;color:#108b7d;font-size:12px}.unpaid{color:#c12635;font-weight:700;background:#fff0f0;border-radius:20px;padding:2px 7px;font-size:12px}dialog{border:0;border-radius:8px;padding:0;width:min(1080px,calc(100vw - 30px));box-shadow:0 24px 80px #081b2d55}dialog::backdrop{background:#17283b80}dialog form{padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:14px}.modal-head button{border:0;font-size:22px;padding:0 5px}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}.field{display:grid;gap:4px;color:#40556c;font-size:12px}.field input,.field select,.field textarea{font:14px inherit;padding:8px;border:1px solid #c4d3df;border-radius:4px;color:#17233c;background:#fff}.field textarea{min-height:58px;resize:vertical}.actions{display:flex;justify-content:flex-end;gap:9px;margin-top:16px}.wide{grid-column:1/-1}.batch-head,.batch-row{display:grid;grid-template-columns:1.15fr 1.6fr .8fr .8fr 1.6fr 34px;gap:7px;align-items:center}.batch-head{margin-top:14px;padding:7px 8px;background:#eef5f5;color:#34516c;font-size:12px;font-weight:700}.batch-row{padding:5px 0;border-bottom:1px solid #edf1f5}.batch-row input{width:100%;padding:7px;border:1px solid #c4d3df;border-radius:4px}.price-cell{text-align:right;color:#108b7d}.add-more{margin-top:10px}.notice{padding:10px;border-radius:4px;background:#edf9f7;color:#19705f;margin:6px 0 12px}.inline{display:flex;gap:8px;align-items:center}.inline select{padding:7px;border:1px solid #c4d3df;border-radius:4px}@media(max-width:800px){#sidebar{width:64px}.side-brand{padding:16px 10px}.side-brand b,.side-brand small,.side-group,.side-sub{font-size:0}.brand-logo{transform:scale(.75)}.side-group{height:45px;padding:0}.side-sub{height:38px;padding:0}header{padding:0 12px}main{padding:14px}.sheet-title{display:block}.fields{grid-template-columns:1fr}.batch-head,.batch-row{grid-template-columns:1fr 1.3fr .65fr .8fr 28px}.batch-head span:nth-child(5),.batch-row .row-note{display:none}}
:root{--side:#273d50;--side2:#203446;--teal:#16b8a6;--blue:#168bd1;--line:#e4e9ee;--muted:#77889a;--bg:#f5f6f8}
#sidebar{width:270px}.side-brand{padding:21px 25px}.side-group{width:100%;min-height:48px;padding:0 24px;display:flex;align-items:center;gap:13px;font-size:15px;letter-spacing:.15px;border:0;border-left:4px solid transparent;border-radius:0;background:transparent;text-align:left}.side-group:hover{background:#213647}.side-group i{width:17px;text-align:center;color:#b6d7db;font-style:normal}.side-sub{padding:9px 20px 9px 67px;font-size:14px;line-height:1.35}.inventory-grid{width:1160px;min-width:1160px;table-layout:fixed}.inventory-grid th:nth-child(1),.inventory-grid td:nth-child(1){width:92px}.inventory-grid th:nth-child(2),.inventory-grid td:nth-child(2){width:300px}.inventory-grid th:nth-child(3),.inventory-grid td:nth-child(3){width:160px}.inventory-grid th:nth-child(n+4),.inventory-grid td:nth-child(n+4){width:101px}.inventory-grid th,.inventory-grid td{overflow:hidden;text-overflow:ellipsis}.inventory-grid td:nth-child(n+4),.inventory-grid th:nth-child(n+4){text-align:right}.inventory-grid th:nth-child(-n+3),.inventory-grid td:nth-child(-n+3){text-align:left}@media(max-width:800px){#sidebar{width:64px}.side-group{padding:0}.side-group i{margin:auto}.side-sub{padding:0}}
.inventory-grid{width:1260px;min-width:1260px}.stock-alert{display:inline-block;padding:3px 9px;border-radius:3px;background:#fff0f0;color:#c12635;font-weight:700}.stock-ok{color:#4f7c70;font-size:12px}.stock-number{color:#c12635}.low-stock td{background:#fffafb}
.inventory-edit{width:84px;padding:5px 6px;text-align:right;color:#214362;border:1px solid #cbd8e2;border-radius:3px;background:#fff}.inventory-edit:focus{outline:2px solid #a6e5dc;border-color:#16b8a6}
.pager{margin-left:auto;display:flex;gap:8px;align-items:center;color:#64748b}.pager b{font-weight:400;color:#43576a}.pager small{margin-left:4px;color:#8a99a8}.pager button:disabled{opacity:.45;cursor:not-allowed}
.product-toolbar{background:linear-gradient(120deg,#f9fdfd,#f1f8f7);border:1px solid #d9ebe8;border-radius:8px;padding:12px 14px;box-shadow:0 4px 14px #24514e0d;flex-wrap:wrap;gap:10px}.catalog-switch{display:flex;gap:6px;padding-right:10px;border-right:1px solid #d4e3e1}.product-tools{display:flex;align-items:center;gap:8px}.product-search{height:34px;display:flex;align-items:center;gap:6px;padding:0 9px;color:#39988d;background:#fff;border:1px solid #cddfdd;border-radius:4px}.product-search input{border:0;outline:0;width:230px;background:transparent;font:inherit;color:#40556c}.catalog-summary{margin-left:auto;display:flex;gap:5px;align-items:baseline;color:#6f8392}.catalog-summary b{font-size:22px;color:#168d82}.catalog-summary em{font-style:normal;margin-left:6px;font-size:12px;color:#91a1ad}.product-toolbar .pager{margin-left:0;background:#fff;padding:3px;border:1px solid #d6e2e1;border-radius:4px}.product-toolbar .pager button{border:0;background:transparent;padding:5px 9px}.product-toolbar .pager b{padding:0 5px;color:#158d81}.grid-wrap{border-radius:8px;box-shadow:0 5px 17px #1c3f4a0e}.grid-wrap thead th{background:#edf5f5;color:#36556c}.grid-wrap tbody tr:nth-child(even){background:#fbfdfd}@media(max-width:1100px){.catalog-summary{margin-left:0}.product-search input{width:160px}}@media(max-width:650px){.product-toolbar{display:block}.product-toolbar>*{margin:5px 0}.catalog-switch,.product-tools{border:0;flex-wrap:wrap}.product-search{width:100%}.product-search input{width:100%}}
.record-filters{background:#fff;border:1px solid #d9e6e6;border-radius:8px;padding:10px 12px;box-shadow:0 3px 12px #1c3f4a0a;flex-wrap:wrap;gap:9px}.record-filters label{display:flex;align-items:center;gap:6px;color:#526a7c;font-size:13px}.record-filters input,.record-filters select{height:33px;padding:5px 8px;border:1px solid #cbd9df;border-radius:4px;background:#fbfdfd;font:inherit;color:#40556c}.filter-count{margin-left:auto;color:#6c8091}.filter-count b{color:#148d82}@media(max-width:800px){.record-filters .filter-count{margin-left:0;width:100%}}
.selection-summary{display:flex;justify-content:flex-end;align-items:center;gap:16px;margin-top:10px;padding:11px 15px;background:#fff;border:1px solid #d7e7e5;border-radius:7px;box-shadow:0 3px 12px #1c3f4a0a;color:#5d7281}.selection-summary b{color:#148d82;font-size:16px}.selection-summary span{padding-left:16px;border-left:1px solid #dce8e7}.selection-summary strong{font-size:18px;color:#e05a41}@media(max-width:600px){.selection-summary{justify-content:space-between;gap:8px}.selection-summary span{padding-left:8px}}
.home-dashboard{display:block;margin:15px 0}.home-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.home-card{min-height:116px;padding:18px;border:1px solid #dce8e8;border-radius:9px;background:linear-gradient(145deg,#fff,#f7fbfb);box-shadow:0 5px 16px #1d45500d;display:flex;flex-direction:column;gap:5px}.home-card span{color:#708494;font-size:13px}.home-card b{font-size:27px;color:#23445a;line-height:1.2}.home-card small{color:#8999a7}.home-card.primary-card{background:linear-gradient(135deg,#198e85,#22b8a4);border:0}.home-card.primary-card span,.home-card.primary-card b,.home-card.primary-card small{color:#fff}.home-card.warning-card b{color:#dd8a1e}.home-card.danger-card b{color:#db524f}.home-panels{display:grid;grid-template-columns:1.35fr 1fr;gap:14px;margin-top:14px}.home-panel{background:#fff;border:1px solid #dce8e8;border-radius:9px;overflow:hidden;box-shadow:0 5px 16px #1d45500d}.panel-head{padding:12px 14px;border-bottom:1px solid #e6efef;display:flex;align-items:center;justify-content:space-between;color:#2c4a5f}.panel-head button{padding:5px 9px;font-size:12px;color:#168d82;border-color:#bfe3de}.warning-list>div,.todo-list>div{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #eef3f3}.warning-list>div:last-child,.todo-list>div:last-child{border-bottom:0}.warning-list span{flex:1;color:#61798b;overflow:hidden;text-overflow:ellipsis}.warning-list em{font-style:normal;color:#d75350;background:#fff0f0;border-radius:14px;padding:2px 8px;font-size:12px}.todo-list span{flex:1;color:#61798b}.todo-list b{color:#178d81}.todo-list .red{color:#d74d4a}.empty-state{margin:0;padding:31px 14px;color:#8495a2;text-align:center}@media(max-width:1050px){.home-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.home-panels{grid-template-columns:1fr}}@media(max-width:560px){.home-cards{grid-template-columns:1fr}.home-card{min-height:95px}}
#homeExtra{margin-top:16px}.sales-board{background:#fff;border:1px solid #dce8e8;border-radius:10px;box-shadow:0 5px 16px #1d45500d;overflow:hidden}.sales-board-head{padding:16px 18px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(100deg,#f1fbfa,#fff)}.sales-board-head b{display:block;font-size:17px;color:#25465b}.sales-board-head span{display:block;margin-top:3px;color:#8193a0;font-size:12px}.sales-board-head strong{color:#148d81;background:#e5f8f4;border-radius:18px;padding:7px 11px;font-size:13px}.sales-rank{padding:3px 18px 16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:24px}.sales-rank article{padding:12px 0 9px;border-bottom:1px solid #edf1f3}.rank-top{display:flex;align-items:center;gap:8px;white-space:nowrap}.rank-top em{width:24px;height:24px;line-height:24px;text-align:center;font-style:normal;font-weight:700;color:#fff;background:#85a5b6;border-radius:50%;font-size:12px}.sales-rank article:nth-child(1) em{background:#f3ac33}.sales-rank article:nth-child(2) em{background:#91a4af}.sales-rank article:nth-child(3) em{background:#ca8c57}.rank-top b{color:#294a5e;min-width:45px}.rank-top span{color:#667f91;overflow:hidden;text-overflow:ellipsis;flex:1}.rank-top strong{color:#168d82}.rank-bar{height:7px;border-radius:9px;background:#edf3f4;margin:9px 0 0 32px;overflow:hidden}.rank-bar i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,#1bc2ac,#278fb9)}@media(max-width:1060px){.sales-rank{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.sales-rank{grid-template-columns:1fr}.sales-board-head{align-items:flex-start;gap:10px;flex-direction:column}}
#controls .home-panel:first-child .warning-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:220px;overflow-y:auto;overflow-x:hidden}.warning-list>div{min-width:0}.warning-list>div b{color:#294a5e}.warning-list>div em{margin-left:auto;white-space:nowrap}@media(max-width:700px){#controls .home-panel:first-child .warning-list{grid-template-columns:1fr}}
#controls .home-panel:first-child{height:250px}#controls .home-panel:first-child .warning-list{max-height:194px}.grid-wrap.home-scroll-grid{height:285px;min-height:0;overflow:auto}.sales-board{height:275px;display:flex;flex-direction:column}.sales-rank{flex:1;overflow-y:auto;overflow-x:hidden}.sales-rank::-webkit-scrollbar,.warning-list::-webkit-scrollbar{width:8px}.sales-rank::-webkit-scrollbar-thumb,.warning-list::-webkit-scrollbar-thumb{background:#bfd9d8;border-radius:8px}.sales-rank::-webkit-scrollbar-track,.warning-list::-webkit-scrollbar-track{background:#f2f7f7}
.save-toast{position:fixed;right:24px;bottom:24px;z-index:9999;opacity:0;transform:translateY(12px);pointer-events:none;background:#1b8c80;color:#fff;border-radius:8px;padding:12px 16px;box-shadow:0 12px 30px #183b4670;transition:opacity .2s,transform .2s}.save-toast.show{opacity:1;transform:translateY(0)}
/* 全站表格与操作一致性优化 */
.grid-wrap{border-radius:9px;box-shadow:0 5px 16px #1d45500d}.grid-wrap thead th{position:sticky;top:0;z-index:2;background:#edf5f5;box-shadow:0 1px 0 #d7e4e5}tbody tr:nth-child(even){background:#fbfdfd}tbody tr:hover{background:#edf9f7}th,td{vertical-align:middle}.inventory-edit,.price-input{width:100%;max-width:112px;border:1px solid #c8d7df;border-radius:5px;padding:6px 8px;text-align:right;color:#294a5e;background:#fff}.inventory-edit:focus,.price-input:focus{outline:2px solid #90ddd3;border-color:#20a995}.stock-alert{display:inline-block;padding:3px 8px;color:#c64743;background:#fff0ef;border-radius:12px;font-size:12px;font-weight:700}.stock-ok{display:inline-block;padding:3px 8px;color:#278574;background:#eaf8f5;border-radius:12px;font-size:12px}.record-filters{padding:11px 12px;background:#fff;border:1px solid #dce8e8;border-radius:8px;box-shadow:0 4px 12px #1d45500a}.record-filters label{display:flex;align-items:center;gap:6px;color:#50697c}.record-filters input,.record-filters select{height:32px;border:1px solid #c8d7df;border-radius:5px;padding:0 8px;color:#344f62;background:#fff}.filter-count{margin-left:auto;color:#748998}.filter-count b{color:#188f82}.product-toolbar{flex-wrap:wrap;padding:11px 12px;background:#fff;border:1px solid #dce8e8;border-radius:8px;box-shadow:0 4px 12px #1d45500a}.pager{margin-left:auto;display:flex;align-items:center;gap:8px}.pager b{color:#397184}.catalog-summary{display:flex;align-items:center;gap:6px;margin-left:auto;color:#778d9d}.catalog-summary b{font-size:20px;color:#178e82}.catalog-summary em{font-style:normal;margin-left:8px;font-size:12px}.toolbar .primary{box-shadow:0 3px 9px #16b8a63d}@media(max-width:900px){.record-filters{align-items:flex-start;flex-wrap:wrap}.filter-count{margin-left:0}.catalog-summary,.pager{margin-left:0}.grid-wrap{max-width:100%}}@media(max-width:560px){main{padding:12px}.record-filters label{width:100%;justify-content:space-between}.record-filters input,.record-filters select{flex:1;min-width:0}.toolbar .muted{display:none}}
/* 移动网页端：手机采购、查看库存与订单 */
.menu-icon{display:none}@media(max-width:768px){body{display:block;min-width:0;background:#f4f7f8}#sidebar{position:fixed;z-index:1000;left:0;top:0;bottom:0;width:252px;min-height:100vh;transform:translateX(-105%);transition:transform .24s ease;box-shadow:8px 0 28px #102d3b4d}#sidebar.mobile-open{transform:translateX(0)}#sidebar.mobile-open:after{content:'';position:fixed;z-index:-1;left:252px;top:0;width:calc(100vw - 252px);height:100vh;background:#122f3a55}.app-shell{width:100%}header{height:52px;padding:0 12px;position:sticky;top:0;z-index:20}.menu-icon{display:block;line-height:1;padding:8px 11px}.crumb{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolbar{gap:5px}.toolbar button{padding:6px 9px;font-size:12px}.toolbar .primary{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#tabs{height:38px;padding-left:10px;overflow-x:auto;overflow-y:hidden}.tab{padding:9px 13px;flex:none}main{padding:12px 10px}.sheet-title{display:block;margin-bottom:8px}.sheet-title h1{font-size:18px}.sheet-title span{display:block;margin-top:3px;line-height:1.45}.controls{margin:9px 0;gap:7px}.home-dashboard{margin:8px 0}.home-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.home-card{min-height:93px;padding:12px}.home-card b{font-size:22px}.home-card small{font-size:11px}.home-panels{gap:9px;margin-top:9px}.home-panel{border-radius:7px}.panel-head{padding:10px 11px}.grid-wrap{border-radius:7px;min-height:0;max-width:100%;-webkit-overflow-scrolling:touch}table{min-width:760px;font-size:13px}th,td{padding:8px 9px}.inventory-grid{min-width:1030px!important}.grid-wrap.home-scroll-grid{height:270px}.sales-board{height:260px;border-radius:7px}.sales-board-head{padding:12px}.sales-board-head b{font-size:15px}.sales-board-head strong{font-size:11px;padding:5px 8px}.sales-rank{grid-template-columns:1fr!important;padding:2px 12px 12px}.rank-top{gap:6px}.rank-top b{min-width:39px}.rank-top strong{font-size:12px}.record-filters{padding:9px;gap:7px}.record-filters label{min-width:calc(50% - 4px);font-size:12px}.record-filters input,.record-filters select{width:100%;min-width:0}.record-filters button{padding:6px 10px}.filter-count{width:100%;margin-top:2px}.product-toolbar{padding:9px;gap:7px}.catalog-switch{width:100%;display:flex;gap:7px}.catalog-switch button{flex:1}.product-tools{display:flex;flex-wrap:wrap;gap:7px;width:100%}.product-search{flex:1;min-width:190px}.product-search input{width:calc(100% - 24px)}.catalog-summary{font-size:12px}.pager{width:100%;justify-content:flex-end}.selection-summary{position:sticky;bottom:8px;z-index:10;margin:8px 0;padding:9px 11px;background:#fffefdf5}dialog{width:calc(100vw - 16px);max-width:none;max-height:calc(100vh - 16px);margin:auto;border-radius:10px}dialog form{max-height:calc(100vh - 16px);overflow:auto;padding:14px}.modal-head{position:sticky;top:-14px;z-index:2;background:#fff;padding-top:14px}.fields{grid-template-columns:1fr;gap:9px}.batch-head,.batch-row{min-width:610px;grid-template-columns:112px 155px 62px 78px 140px 30px}.batch-head{overflow:hidden}.batch-head,.batch-row{font-size:12px}.batch-row input{padding:8px}.batch-head+ #batchRows,#batchRows{overflow-x:auto;padding-bottom:5px}.add-more{width:100%;padding:9px}.actions{position:sticky;bottom:-14px;background:#fff;padding:12px 0 0;margin-top:12px}.actions button{min-height:40px;min-width:78px}.save-toast{left:12px;right:12px;bottom:16px;text-align:center}.warning-list{font-size:13px}.warning-list>div,.todo-list>div{padding:9px 11px}}
@media(max-width:390px){.home-cards{grid-template-columns:1fr}.toolbar .primary{max-width:82px}.sheet-title h1{font-size:17px}.record-filters label{min-width:100%}}
.mobile-close{display:none}@media(max-width:768px){.side-brand{position:relative}.mobile-close{display:flex;position:absolute;right:12px;top:12px;width:34px;height:34px;padding:0;align-items:center;justify-content:center;border:1px solid #5a7385;border-radius:50%;background:#29465b;color:#fff;font-size:25px;line-height:1}.mobile-close:hover{background:#376179}}
@media(max-width:768px){#sidebar{width:268px!important}.side-brand{height:82px!important;padding:0 18px!important;gap:11px!important}.side-brand b{font-size:19px!important;line-height:1.15}.side-brand small{font-size:10px!important;margin-top:3px}.brand-logo{width:36px;height:36px;transform:none!important;flex:none}.side-section{padding-top:7px}.side-group{height:48px!important;min-height:48px!important;padding:0 18px!important;gap:13px!important;font-size:14px!important;text-align:left!important}.side-group i{width:18px!important;flex:0 0 18px;margin:0!important;text-align:center}.side-group span{flex:1;text-align:left;white-space:nowrap}.side-sub{height:auto!important;min-height:38px!important;padding:9px 18px 9px 54px!important;font-size:13px!important;line-height:1.4!important;text-align:left!important;white-space:nowrap}.mobile-close{right:14px!important;top:23px!important;z-index:2}.side-brand>span{display:block!important;min-width:0}.side-brand>span b,.side-brand>span small{display:block!important}.side-brand{padding-right:58px!important}#sidebar.mobile-open:after{left:268px!important;width:calc(100vw - 268px)!important}}
.view-loading{cursor:progress}.page-loading,.dashboard-loading{padding:34px!important;text-align:center!important;color:#76909b!important;background:#fff}.dashboard-loading{border:1px solid #dce8e8;border-radius:9px;box-shadow:0 5px 16px #1d45500d}.view-loading .side-sub,.view-loading .side-group{pointer-events:none;opacity:.72}
.purchase-summary{display:flex;justify-content:flex-end;align-items:center;gap:22px;margin:12px 0 2px;padding:12px 14px;border:1px solid #bfe3de;border-radius:7px;background:linear-gradient(100deg,#f3fcfa,#e8f8f5);color:#557184}.purchase-summary strong{color:#176b63;font-size:16px}.purchase-summary strong b{margin-left:5px;color:#d35445;font-size:22px}.purchase-summary span b{color:#168d82;font-size:16px}@media(max-width:650px){.purchase-summary{justify-content:space-between;gap:8px;padding:10px}.purchase-summary strong{font-size:14px}.purchase-summary strong b{font-size:18px}}
.price-matrix-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 12px;border:1px solid #d8e7e6;border-radius:8px;background:linear-gradient(100deg,#f7fdfc,#eff8f7);box-shadow:0 3px 12px #1d45500a}.price-matrix-toolbar select{height:34px;min-width:245px;padding:0 9px;border:1px solid #c9dadd;border-radius:5px;background:#fff;color:#385268;font:inherit}.price-matrix-toolbar .pager{margin-left:auto}.price-matrix-toolbar+.pager{display:none}@media(max-width:720px){.price-matrix-toolbar select{min-width:0;flex:1}.price-matrix-toolbar .pager{margin-left:0;width:100%;justify-content:flex-end}}
.order-batch-bar td{padding:9px 12px!important;background:linear-gradient(90deg,#edf9f7,#f6fbfb)!important;border-top:2px solid #b8e4dd!important}.order-batch-bar>td>div{display:flex;align-items:center;gap:14px}.order-batch-bar>td>div+div{justify-content:flex-end;margin-top:-25px}.order-batch-bar b{color:#25485d}.order-batch-bar span{color:#668294;font-size:12px}.order-batch-bar strong{color:#d35342;font-size:15px}.order-batch-bar button{padding:6px 10px;font-size:12px}.agent-record-total{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:11px;padding:12px 15px;background:linear-gradient(100deg,#f3fcfa,#e8f8f5);border:1px solid #bfe3de;border-radius:7px;color:#587385}.agent-record-total strong{font-size:20px;color:#d35342}.agent-record-total span{padding-left:14px;border-left:1px solid #cbe5e1;color:#168d82}@media(max-width:720px){.order-batch-bar>td>div{align-items:flex-start;flex-wrap:wrap;gap:7px}.order-batch-bar>td>div+div{justify-content:flex-start;margin-top:4px}.agent-record-total{justify-content:space-between;gap:8px;padding:10px}.agent-record-total strong{font-size:17px}}
.purchase-catalog-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:11px 13px;border:1px solid #d7e7e5;border-radius:9px;background:linear-gradient(100deg,#fff,#f1faf8);box-shadow:0 4px 14px #1d45500c}.catalog-search{display:flex;align-items:center;gap:6px;height:34px;padding:0 9px;border:1px solid #c9dadd;border-radius:5px;background:#fff;color:#179585}.catalog-search input{width:230px;border:0;outline:0;font:inherit;color:#40576a;background:transparent}.catalog-count{margin-left:auto;color:#718796}.catalog-count b{font-size:19px;color:#168d82}.purchase-catalog-toolbar .pager{margin-left:0}.purchase-catalog-wrap{max-width:1220px!important;margin:0 auto 18px!important;border-radius:9px!important}.purchase-catalog-grid{table-layout:fixed}.purchase-catalog-grid th:nth-child(1),.purchase-catalog-grid td:nth-child(1){width:150px}.purchase-catalog-grid th:nth-child(2),.purchase-catalog-grid td:nth-child(2){width:430px}.purchase-catalog-grid th:nth-child(3),.purchase-catalog-grid td:nth-child(3){width:250px}.purchase-catalog-grid th:nth-child(4),.purchase-catalog-grid td:nth-child(4){width:140px}.purchase-catalog-grid td:nth-child(4),.purchase-catalog-grid th:nth-child(4){text-align:right}.purchase-catalog-grid tbody tr{height:45px}@media(max-width:720px){.catalog-search{flex:1}.catalog-search input{width:100%}.catalog-count{margin-left:0}.purchase-catalog-toolbar .pager{width:100%;justify-content:flex-end}.purchase-catalog-wrap{max-width:100%!important}.purchase-catalog-grid{min-width:760px!important}}
.app-alert{width:min(450px,calc(100vw - 32px));max-width:none;margin:auto;padding:0;border:0;border-radius:14px;overflow:hidden;box-shadow:0 20px 60px #112a3c52}.app-alert form{padding:0}.app-alert::backdrop{background:#1028388c}.app-alert-body{padding:28px 28px 18px;background:linear-gradient(140deg,#fff,#f8fcfc)}.app-alert-body strong{display:block;color:#1d3e55;font-size:17px}.app-alert-body p{margin:13px 0 0;color:#425d71;line-height:1.65;word-break:break-word}.app-alert-actions{display:flex;justify-content:flex-end;padding:13px 22px 20px;background:#fff}.app-alert-actions button{min-width:78px;padding:9px 16px;border-radius:7px;box-shadow:0 4px 12px #16a7963d}@media(max-width:560px){.app-alert{width:calc(100vw - 28px);border-radius:12px}.app-alert-body{padding:23px 20px 15px}.app-alert-actions{padding:11px 18px 17px}.app-alert-actions button{min-width:82px;min-height:40px}}
/* 桌面端固定工作区：导航与页面工具栏不随数据表滚动 */
@media(min-width:769px){
  body{height:100vh;overflow:hidden}
  #sidebar{position:fixed;inset:0 auto 0 0;height:100vh;overflow-y:auto;z-index:50}
  .app-shell{height:100vh;margin-left:270px;display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}
  header,#tabs{flex:0 0 auto;position:relative;z-index:80;background:#fff}
  #viewHead{position:relative;z-index:70;flex:0 0 auto;margin:0;padding:18px 22px 13px;background:var(--bg);box-shadow:0 1px 0 #dce6e7}
  main{position:relative;flex:1 1 auto;overflow:auto;padding:0 22px 18px}
  .sheet-title{margin:0;padding:2px 0 8px;background:transparent}
  #controls{margin:0;padding:5px 0 0;background:transparent}
  .grid-wrap{position:relative;z-index:1}
  .grid-wrap thead th{z-index:2}
  main>.home-dashboard{margin:18px 0 0}
}

/* 批次订单：合计与确认操作从金额列开始显示 */
.order-batch-bar>td{vertical-align:middle}
.order-batch-bar .batch-order-info{display:flex;align-items:center;gap:14px}
.order-batch-bar .batch-order-action{display:flex;align-items:center;justify-content:flex-start;gap:14px;background:#f4fffd}
.order-batch-bar .batch-order-action strong{color:#e95745;font-size:16px;white-space:nowrap}
.order-batch-bar .batch-order-action .primary{white-space:nowrap}
@media(max-width:760px){.order-batch-bar .batch-order-info,.order-batch-bar .batch-order-action{gap:7px;flex-wrap:wrap}.order-batch-bar .batch-order-action strong{font-size:14px}}

/* 每批订单结尾：合计与操作固定落在该批列表右下方 */
.order-batch-footer td{padding:10px 14px!important;background:linear-gradient(90deg,#f7fcfc,#edfaf7)!important;border-top:1px solid #cce9e4!important}
.order-batch-footer .batch-order-action{display:flex;align-items:center;justify-content:flex-end;gap:14px}
.order-batch-footer .batch-order-action strong{color:#e95745;font-size:17px;white-space:nowrap}
.order-batch-footer .batch-order-action .primary{white-space:nowrap}
.order-batch-footer .shipment-edit{cursor:pointer;border:1px dashed #67cfc2;background:#e7f8f5;padding:5px 9px;user-select:none}
.order-batch-footer .shipment-edit:hover{background:#d9f5ef;color:#087d71}
/* 物流资料只在整单底部维护，禁止在每一行的操作栏重复显示。 */
.grid-wrap tbody tr:not(.order-batch-footer) td:last-child .primary{display:none!important}
.order-context-cell{vertical-align:middle!important;background:#f8fbfc;font-weight:600;color:#36516b}
.order-number{letter-spacing:.2px;color:#0d8f82}
.purchase-catalog-grid .sale-price-input{width:132px;padding:7px 9px;border:1px solid #bcd5d1;border-radius:4px;color:#0d8f82;text-align:right;font:inherit}
.purchase-catalog-grid td:nth-last-child(2){background:#fbfffe}
.purchase-catalog-toolbar .export-quote{display:inline-flex;align-items:center;text-decoration:none}
/* The logistics safeguard hides row-level primary actions elsewhere; product retail-price saving is an allowed action. */
.grid-wrap .purchase-catalog-grid tbody tr:not(.order-batch-footer) td:last-child .primary{display:inline-flex!important}

/* Agent catalog: balanced six-column layout for pricing and saving. */
.purchase-catalog-grid th:nth-child(1),.purchase-catalog-grid td:nth-child(1){width:12%!important}
.purchase-catalog-grid th:nth-child(2),.purchase-catalog-grid td:nth-child(2){width:30%!important}
.purchase-catalog-grid th:nth-child(3),.purchase-catalog-grid td:nth-child(3){width:22%!important}
.purchase-catalog-grid th:nth-child(4),.purchase-catalog-grid td:nth-child(4){width:14%!important;text-align:right}
.purchase-catalog-grid th:nth-child(5),.purchase-catalog-grid td:nth-child(5){width:14%!important;text-align:center}
.purchase-catalog-grid th:nth-child(6),.purchase-catalog-grid td:nth-child(6){width:8%!important;text-align:center}
.purchase-catalog-grid .sale-price-input{width:112px!important}
.purchase-catalog-grid th:nth-child(1),.purchase-catalog-grid td:nth-child(1){width:13%!important}
.purchase-catalog-grid th:nth-child(2),.purchase-catalog-grid td:nth-child(2){width:36%!important}
.purchase-catalog-grid th:nth-child(3),.purchase-catalog-grid td:nth-child(3){width:24%!important}
.purchase-catalog-grid th:nth-child(4),.purchase-catalog-grid td:nth-child(4){width:13%!important}
.purchase-catalog-grid th:nth-child(5),.purchase-catalog-grid td:nth-child(5){width:14%!important}
/* 物流信息只能在每批订单底部编辑，禁止出现在单条记录操作列。 */
.grid-wrap td button.primary[onclick*="openOrderLogistics"]{display:none!important}
.order-batch-footer .batch-order-action{min-height:42px;padding:2px 4px}
.order-batch-footer .batch-order-action strong{margin-right:4px}
@media(max-width:760px){.order-batch-footer td{padding:9px!important}.order-batch-footer .batch-order-action{gap:8px;flex-wrap:wrap}.order-batch-footer .batch-order-action strong{font-size:15px}}

/* 首页待办与物流信息 */
.home-card.danger-card[role="button"]{cursor:pointer;transition:transform .16s,box-shadow .16s}
.home-card.danger-card[role="button"]:hover,.home-card.danger-card[role="button"]:focus{transform:translateY(-2px);box-shadow:0 10px 22px #c94b4430;outline:2px solid #f0b8b1;outline-offset:2px}
.logistics-info{padding:5px 9px;border-radius:5px;background:#e9f7f4;color:#237c73;font-size:12px;white-space:nowrap}
.logistics-track{border:0;cursor:pointer;font:inherit;text-decoration:none}.logistics-track:hover{filter:brightness(.94);text-decoration:underline}

/* Agent catalogue: compact, ordered actions and balanced desktop layout. */
.purchase-catalog-toolbar{max-width:1440px;margin:0 auto 12px!important;min-height:52px;padding:9px 12px!important}.purchase-catalog-wrap{max-width:1440px!important;box-shadow:0 8px 24px #163a4a0b}.catalog-price-actions{display:flex;align-items:center;gap:8px;padding-right:10px;margin-right:2px;border-right:1px solid #dbe8e6}.catalog-price-actions .save-sale-prices{white-space:nowrap}.catalog-price-actions .export-quote{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 11px;border:1px solid #18aa9d;border-radius:5px;background:#fff;color:#138d82;text-decoration:none;font-weight:600;white-space:nowrap}.catalog-price-actions .export-quote:hover{background:#eaf9f6}.purchase-catalog-toolbar>button.primary:first-of-type{order:-1;white-space:nowrap}.purchase-catalog-toolbar .catalog-search{margin-left:2px}.purchase-catalog-grid thead th{background:linear-gradient(90deg,#edf9f7,#f7fbfb);font-size:14px}.purchase-catalog-grid tbody tr:hover td{background:#f5fcfa}.purchase-catalog-grid td{padding:9px 12px!important}.purchase-catalog-grid .sale-price-input{background:#fff;border-color:#b8d9d4!important;transition:border-color .15s,box-shadow .15s}.purchase-catalog-grid .sale-price-input:focus{border-color:#16ac9d!important;box-shadow:0 0 0 3px #16ac9d1c;outline:0}@media(max-width:720px){.purchase-catalog-toolbar{margin:0 8px 9px!important;padding:9px!important}.catalog-price-actions{width:100%;padding:0 0 8px;margin:0;border:0;border-bottom:1px solid #dbe8e6}.catalog-price-actions>*{flex:1}.purchase-catalog-toolbar>button.primary:first-of-type{order:0}.purchase-catalog-wrap{margin:0 8px 12px!important}}

.agent-record-total .agent-items-link{border:0;border-left:1px solid #cbe5e1;border-radius:0;background:transparent;color:#168d82;padding:2px 0 2px 14px;font:inherit;cursor:pointer}.agent-record-total .agent-items-link:hover{color:#087b72;text-decoration:underline}.agent-items-dialog{width:min(760px,calc(100vw - 32px));border:0;border-radius:12px;padding:0;box-shadow:0 24px 70px #0d253a55}.agent-items-dialog::backdrop{background:#13263b88}.agent-items-dialog form{margin:0}.agent-items-dialog .modal-head{padding:17px 20px}.agent-items-table{max-height:min(55vh,480px);overflow:auto;padding:0 20px}.agent-items-table table{width:100%;border-collapse:collapse}.agent-items-table th,.agent-items-table td{padding:11px 10px;border-bottom:1px solid #e4edf0;text-align:left}.agent-items-table th{position:sticky;top:0;background:#eff9f7;color:#234c64}.agent-items-total{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin:16px 20px 0;padding:12px;background:#edf9f7;border-radius:7px;color:#557386}.agent-items-total strong{color:#e55343;font-size:18px}.agent-items-dialog .actions{padding:14px 20px 18px}@media(max-width:720px){.agent-record-total .agent-items-link{padding-left:8px}.agent-items-table{padding:0 10px}.agent-items-table th,.agent-items-table td{padding:9px 6px;font-size:13px}.agent-items-total{margin:12px 10px 0}}

/* 采购审核表：收紧批次分组，保持筛选、表格与合计的视觉节奏一致。 */
.record-filters{min-height:48px!important;padding:7px 10px!important;gap:7px!important;align-items:center!important}
.record-filters label{height:34px;padding:0 2px;white-space:nowrap}
.record-filters input,.record-filters select{height:34px!important}
.record-filters button{height:34px;padding:6px 11px!important;white-space:nowrap}
.record-filters .filter-count{padding:0 11px;margin-left:auto!important;white-space:nowrap;color:#6f8494}
.record-filters .pager{height:34px;margin-left:0!important;padding-left:9px;border-left:1px solid #e2ecec;white-space:nowrap}
.record-filters .pager button{height:30px;padding:4px 9px!important}
.grid-wrap table td{vertical-align:middle!important}
.grid-wrap .order-context-cell{background:linear-gradient(90deg,#fbfefe,#f6fbfb)!important;color:#254c63!important;font-weight:700!important}
.grid-wrap .order-number{color:#078f83!important;letter-spacing:.35px}
.grid-wrap tbody tr:not(.order-batch-footer) td{height:47px;padding-top:7px!important;padding-bottom:7px!important}
.grid-wrap tbody tr:not(.order-batch-footer):hover td{background:#f4fbfa!important}
.grid-wrap .order-batch-footer td{height:42px!important;padding:0!important;background:transparent!important;border-top:0!important;border-bottom:7px solid #f3f7f8!important}
.grid-wrap .order-batch-footer .batch-order-action{min-height:42px!important;height:42px!important;padding:0 18px!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;background:linear-gradient(90deg,#f9fdfd 0%,#ebfaf7 100%)!important;border-top:1px solid #cde8e4!important;border-bottom:1px solid #d8efeb!important}
.grid-wrap .order-batch-footer .batch-order-action strong{margin:0!important;font-size:16px!important;line-height:1!important;color:#e65342!important;letter-spacing:.2px}
.grid-wrap .order-batch-footer .batch-order-action .tag,.grid-wrap .order-batch-footer .batch-order-action button{min-height:28px;padding:4px 9px!important;line-height:18px}
.grid-wrap .order-batch-footer .order-add-product{border-color:#8dd3ca;background:#fff;color:#0b8d80;font-weight:700}
.grid-wrap .order-batch-footer .order-add-product:hover{background:#e8f8f5}
.batch-items{margin-right:auto;color:#78909c;font-size:12px;white-space:nowrap}
.batch-stage{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border:1px solid #f0d7a4;border-radius:14px;background:#fff8e9;color:#a66a12;font-size:12px;white-space:nowrap}
.selection-summary{min-height:48px;margin:10px 0 0!important;padding:9px 15px!important;border-color:#cce5e1!important;background:linear-gradient(90deg,#fff,#f2fcfa)!important}
@media(max-width:900px){.record-filters .filter-count{margin-left:0!important}.record-filters .pager{margin-left:auto!important}}
@media(max-width:760px){.record-filters{padding:8px!important}.record-filters label{height:auto;padding:0;white-space:normal}.record-filters .pager{width:100%;padding-left:0;border-left:0;justify-content:flex-end}.grid-wrap .order-batch-footer td{height:auto!important;border-bottom-width:6px!important}.grid-wrap .order-batch-footer .batch-order-action{height:auto!important;min-height:40px!important;padding:7px 10px!important;justify-content:flex-end!important;flex-wrap:wrap}.grid-wrap .order-batch-footer .batch-order-action strong{font-size:15px!important}.selection-summary{position:sticky;bottom:8px;z-index:8}}

/* 代理商每日采购：以订单为单位的紧凑业务台账。 */
.agent-daily-grid{table-layout:fixed;background:#fff}
.agent-daily-grid th{height:40px;padding:9px 12px!important;background:linear-gradient(90deg,#edf8f7,#f7fbfb)!important;color:#31566b}
.agent-daily-grid td{height:44px;padding:8px 12px!important;border-color:#e5edef!important;color:#435e73}
.agent-daily-grid th:nth-child(1),.agent-daily-grid td:nth-child(1){width:110px}
.agent-daily-grid th:nth-child(2),.agent-daily-grid td:nth-child(2){width:130px}
.agent-daily-grid th:nth-child(3),.agent-daily-grid td:nth-child(3){width:150px}
.agent-daily-grid th:nth-child(n+4),.agent-daily-grid td:nth-child(n+4){text-align:right}
.agent-daily-grid tbody tr:hover td{background:#f3fbf9!important}
.daily-order-link{padding:4px 8px!important;border:0!important;background:#e9f8f5!important;color:#078e81!important;font-weight:700;letter-spacing:.3px}
.daily-order-link:hover{background:#d8f3ee!important;text-decoration:underline}
@media(max-width:760px){.agent-daily-grid{min-width:1020px!important}.agent-daily-grid th,.agent-daily-grid td{height:42px;padding:7px 9px!important}}

/* 代理商客户报价单：独立于采购模块的对客零售价格工作区。 */
.quote-catalog-toolbar{max-width:1240px;margin:0 auto 12px!important;min-height:54px;padding:10px 12px!important;display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid #d5e7e4;border-radius:9px;background:linear-gradient(100deg,#fff,#effaf8);box-shadow:0 5px 15px #163a4a0c}
.quote-actions{display:flex;align-items:center;gap:8px;padding-right:10px;border-right:1px solid #dce9e8}
.quote-actions .primary{min-height:34px;white-space:nowrap}
.quote-actions .export-quote{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 11px;border:1px solid #16a899;border-radius:5px;color:#108b80;background:#fff;text-decoration:none;font-weight:700;white-space:nowrap}
.quote-actions .export-quote:hover{background:#e9f8f5}
.quote-count{margin-left:auto;color:#708697;white-space:nowrap}
.quote-count b{color:#138f82;font-size:17px}
.quote-catalog-wrap{max-width:1240px!important;margin:0 auto 18px!important;border-radius:9px!important;box-shadow:0 8px 22px #153b4b0e}
.quote-catalog-grid{table-layout:fixed}
.quote-catalog-grid th{background:linear-gradient(90deg,#ecf8f6,#f8fcfc)!important;color:#2f586e}
.quote-catalog-grid th:nth-child(1),.quote-catalog-grid td:nth-child(1){width:14%}
.quote-catalog-grid th:nth-child(2),.quote-catalog-grid td:nth-child(2){width:34%}
.quote-catalog-grid th:nth-child(3),.quote-catalog-grid td:nth-child(3){width:23%}
.quote-catalog-grid th:nth-child(4),.quote-catalog-grid td:nth-child(4){width:14%;text-align:right}
.quote-catalog-grid th:nth-child(5),.quote-catalog-grid td:nth-child(5){width:15%;text-align:center;background:#fbfffe}
.quote-catalog-grid td{height:46px;padding:8px 12px!important}
.quote-catalog-grid .sale-price-input{width:118px;padding:7px 9px;border:1px solid #add6cf;border-radius:5px;text-align:right;color:#087f74;background:#fff;font:inherit}
.quote-catalog-grid .sale-price-input:focus{outline:0;border-color:#11a998;box-shadow:0 0 0 3px #15b3a51a}
.new-product-badge{display:inline-flex;align-items:center;margin-left:8px;padding:2px 6px;border-radius:10px;background:#fff1d6;color:#d77a00;font-size:11px;font-weight:700;line-height:16px;vertical-align:middle;white-space:nowrap}
.purchase-catalog-grid th:nth-child(1),.purchase-catalog-grid td:nth-child(1){width:14%!important}
.purchase-catalog-grid th:nth-child(2),.purchase-catalog-grid td:nth-child(2){width:40%!important}
.purchase-catalog-grid th:nth-child(3),.purchase-catalog-grid td:nth-child(3){width:28%!important}
.purchase-catalog-grid th:nth-child(4),.purchase-catalog-grid td:nth-child(4){width:18%!important;text-align:right}
@media(max-width:760px){.quote-catalog-toolbar{margin:0 8px 9px!important;padding:9px!important}.quote-actions{width:100%;padding:0 0 8px;border-right:0;border-bottom:1px solid #dce9e8}.quote-actions>*{flex:1}.quote-count{margin-left:0;width:100%}.quote-catalog-toolbar .pager{width:100%;justify-content:flex-end}.quote-catalog-wrap{margin:0 8px 12px!important}.quote-catalog-grid{min-width:760px!important}}

/* Mobile-first refinement: portrait is touch-friendly; landscape keeps useful columns. */
@media(max-width:760px){
html,body{width:100%;max-width:100%;overflow-x:hidden}body{font-size:14px}.app-shell{min-width:0!important;width:100%!important;margin-left:0!important;min-height:100dvh}#sidebar{width:min(82vw,290px)!important;overflow-y:auto;-webkit-overflow-scrolling:touch}#sidebar.mobile-open:after{left:min(82vw,290px)!important;width:calc(100vw - min(82vw,290px))!important}.side-brand{height:82px!important;padding:16px 18px!important}.side-brand b{font-size:18px!important}.side-group{min-height:46px!important;padding:0 18px!important;font-size:14px!important}.side-sub{padding:10px 18px 10px 52px!important;font-size:13px!important;min-height:39px}header{height:54px!important;padding:0 10px!important;gap:8px!important}.menu-icon{min-width:40px;min-height:40px;font-size:20px!important}.crumb{font-size:13px!important}.toolbar{margin-left:auto;gap:5px!important}.toolbar button{min-height:38px;padding:7px 9px!important}#tabs{height:40px!important;padding-left:8px!important;scrollbar-width:none}#tabs::-webkit-scrollbar{display:none}.tab{padding:10px 12px!important;font-size:13px}main{padding:10px 8px 18px!important;min-width:0}.sheet-title{padding:2px 3px 0!important}.sheet-title h1{font-size:18px!important;line-height:1.3}.sheet-title span{font-size:12px!important;color:#718696!important}.controls{width:100%;min-width:0;gap:7px!important}button,.export-quote{min-height:38px!important}.record-filters,.product-toolbar,.purchase-catalog-toolbar,.quote-catalog-toolbar{border-radius:8px!important}.record-filters label{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center!important;gap:5px!important;min-width:calc(50% - 4px)!important}.record-filters label input,.record-filters label select{min-width:0!important;width:100%!important}.record-filters .pager,.product-toolbar .pager,.purchase-catalog-toolbar .pager,.quote-catalog-toolbar .pager{margin-left:0!important;width:100%!important;justify-content:flex-end!important}.product-tools,.catalog-switch,.quote-actions{gap:7px!important}.product-tools button,.catalog-switch button,.quote-actions>*{min-height:38px!important}.catalog-search,.product-search{min-width:0!important;width:100%!important;flex:1 1 100%!important}.catalog-search input,.product-search input{min-width:0!important;width:100%!important;font-size:16px!important}.catalog-count,.quote-count,.catalog-summary,.filter-count{width:100%;margin-left:0!important;text-align:right!important}.grid-wrap{width:100%;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.grid-wrap:after{content:'左右滑动查看完整表格';display:block;position:sticky;left:8px;width:max-content;margin:7px 0 3px;padding:3px 7px;border-radius:10px;background:#e9f7f5;color:#238c82;font-size:11px;pointer-events:none}.grid-wrap table{font-size:13px!important}th,td{padding:8px 9px!important}.purchase-catalog-wrap,.quote-catalog-wrap{margin-left:0!important;margin-right:0!important}.purchase-catalog-grid{min-width:650px!important}.quote-catalog-grid{min-width:700px!important}.quote-catalog-grid th:nth-child(1),.quote-catalog-grid td:nth-child(1){width:105px!important}.quote-catalog-grid th:nth-child(2),.quote-catalog-grid td:nth-child(2){width:220px!important}.quote-catalog-grid th:nth-child(3),.quote-catalog-grid td:nth-child(3){width:170px!important}.quote-catalog-grid .sale-price-input{width:112px!important;min-height:38px;font-size:16px!important}.selection-summary,.agent-record-total{position:sticky;bottom:8px;z-index:12;min-height:48px;margin:9px 0!important;padding:9px 11px!important;border-radius:8px!important;box-shadow:0 5px 18px #153c4a28!important}.agent-record-total{display:flex!important;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.agent-record-total strong,.selection-summary strong{font-size:18px!important}dialog,.agent-items-dialog{width:calc(100vw - 16px)!important;max-width:none!important;max-height:calc(100dvh - 16px)!important}dialog form{max-height:calc(100dvh - 16px)!important;padding:13px!important}.modal-head{margin-bottom:10px!important}.fields{grid-template-columns:1fr!important}.field input,.field select,.field textarea{min-height:40px;font-size:16px!important}.actions{gap:8px!important}.actions button{flex:1;min-height:42px!important}.batch-head,.batch-row{min-width:645px!important;grid-template-columns:118px 160px 66px 83px 165px 34px!important}.batch-head+ #batchRows,#batchRows{padding-bottom:8px!important}.order-batch-footer .batch-order-action{justify-content:flex-end!important;text-align:right!important}.home-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.home-card{padding:12px!important}.home-panel,.sales-board{border-radius:8px!important}}
@media(max-width:430px){.toolbar .muted{display:none!important}.toolbar .primary{max-width:118px!important}.record-filters label{min-width:100%!important}.home-cards{grid-template-columns:1fr!important}.selection-summary{align-items:flex-start!important;flex-direction:column}.selection-summary span{border-left:0!important;padding-left:0!important}.grid-wrap:after{font-size:10px}}

/* Agent purchase catalog: a one-column, no-horizontal-scroll layout on phones. */
@media(max-width:760px){
  .purchase-catalog-toolbar{display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;padding:10px!important;margin:8px 0 12px!important;background:#fff!important;border:1px solid #d8e8e6!important;border-radius:10px!important;box-shadow:0 5px 16px #173c4a0d!important}
  .purchase-catalog-toolbar .purchase-new-order{grid-column:1/-1!important;width:100%;min-height:42px!important;font-size:15px!important}
  .purchase-catalog-toolbar .purchase-search{grid-column:1/2!important;width:100%!important;min-width:0!important;height:42px!important;padding:0 11px!important}
  .purchase-catalog-toolbar .purchase-search-button{grid-column:2/3!important;min-height:42px!important;padding:7px 15px!important}
  .purchase-catalog-toolbar .catalog-count{grid-column:1/2!important;width:auto!important;margin:0!important;padding:4px 2px!important;text-align:left!important;align-self:center!important}
  .purchase-catalog-toolbar .pager{grid-column:2/3!important;width:auto!important;margin:0!important;justify-content:flex-end!important;gap:5px!important;white-space:nowrap!important}
  .purchase-catalog-toolbar .pager button{min-height:34px!important;padding:5px 8px!important;font-size:12px!important}
  .purchase-catalog-wrap{overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .purchase-catalog-wrap:after{display:none!important}
  .purchase-catalog-grid{display:block!important;width:100%!important;min-width:0!important;background:transparent!important}
  .purchase-catalog-grid thead{display:none!important}
  .purchase-catalog-grid tbody{display:grid!important;gap:9px!important}
  .purchase-catalog-grid tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;overflow:hidden!important;border:1px solid #d9e9e7!important;border-radius:10px!important;background:#fff!important;box-shadow:0 4px 14px #173c4a0c!important}
  .purchase-catalog-grid th,.purchase-catalog-grid td,.purchase-catalog-grid td:nth-child(n){width:auto!important;max-width:none!important;min-width:0!important}
  .purchase-catalog-grid td{display:flex!important;min-width:0!important;min-height:44px!important;height:auto!important;align-items:center!important;justify-content:space-between!important;padding:9px 11px!important;border:0!important;border-bottom:1px solid #e8f0f1!important;white-space:normal!important;text-align:right!important;word-break:break-word!important}
  .purchase-catalog-grid td:before{content:attr(data-label);margin-right:8px;color:#788f9c;font-size:12px;font-weight:600;text-align:left;white-space:nowrap!important}
  .purchase-catalog-grid td:nth-child(1){grid-column:1/-1!important;min-height:40px!important;background:linear-gradient(90deg,#ecf8f6,#fbfefe)!important;color:#214b61!important}
  .purchase-catalog-grid td:nth-child(2){grid-column:1/-1!important;justify-content:flex-start!important;gap:10px!important;color:#334f63!important}
  .purchase-catalog-grid td:nth-child(2):before{flex:none!important}
  .purchase-catalog-grid td:nth-child(3),.purchase-catalog-grid td:nth-child(4){border-bottom:0!important}
  .purchase-catalog-grid td:nth-child(4){color:#078f83!important;font-size:15px!important}
}
@media(max-width:390px){
  .purchase-catalog-toolbar .pager{grid-column:1/-1!important;justify-content:space-between!important;width:100%!important}
  .purchase-catalog-toolbar .catalog-count{grid-column:1/-1!important;text-align:center!important}
}

/* Purchase order modal: replace the desktop six-column row with touch cards. */
@media(max-width:760px){
  #editor #fields .batch-head{display:none!important}
  #editor #batchRows{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;overflow:visible!important;padding:0!important}
  #editor #batchRows .batch-row{position:relative!important;display:grid!important;min-width:0!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px 10px!important;padding:11px!important;border:1px solid #d8e8e6!important;border-radius:10px!important;background:#fbfefe!important;box-shadow:0 3px 10px #163a4709!important}
  #editor #batchRows .batch-row [name="code"]{grid-column:1/-1!important;width:100%!important;min-height:40px!important;padding-right:40px!important}
  #editor #batchRows .batch-row .product-name{grid-column:1/-1!important;display:block!important;min-height:22px!important;padding:1px 0!important;color:#294d62!important;font-size:14px!important;line-height:1.45!important;white-space:normal!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #editor #batchRows .batch-row [name="qty"]{width:100%!important;min-height:40px!important}
  #editor #batchRows .batch-row .price-cell{display:flex!important;align-items:center!important;justify-content:flex-end!important;min-height:40px!important;padding:0 6px!important;font-size:16px!important;color:#078e81!important}
  #editor #batchRows .batch-row .row-note{grid-column:1/-1!important;width:100%!important;min-height:40px!important}
  #editor #batchRows .batch-row .danger{position:absolute!important;right:12px!important;top:12px!important;z-index:2!important;width:30px!important;min-width:30px!important;min-height:30px!important;height:30px!important;padding:0!important;border:0!important;border-radius:50%!important;background:#fff0f0!important;color:#c8494b!important;font-size:18px!important;line-height:1!important}
  #editor .purchase-summary{position:sticky!important;bottom:0!important;z-index:3!important;display:flex!important;justify-content:space-between!important;gap:9px!important;align-items:center!important;margin-top:12px!important;padding:11px!important;border:1px solid #bfe3dc!important;border-radius:9px!important;background:#edfaf7!important}
  #editor .purchase-summary strong{font-size:15px!important;color:#157c73!important}.purchase-summary b{color:#e55343!important;font-size:19px!important}
}
@media(orientation:landscape) and (max-height:620px) and (max-width:1100px){#sidebar{width:208px!important}.app-shell{margin-left:208px!important;width:calc(100% - 208px)!important;height:100dvh;overflow:hidden}#sidebar{position:fixed!important;transform:none!important;z-index:30}#sidebar.mobile-open:after{display:none!important}.side-brand{height:62px!important;padding:10px 14px!important}.brand-logo{transform:scale(.72);transform-origin:left center}.side-brand b{font-size:16px!important}.side-brand small{font-size:9px!important}.side-section{padding-top:2px!important}.side-group{min-height:35px!important;padding:0 14px!important;font-size:12px!important}.side-sub{min-height:29px!important;padding:6px 12px 6px 44px!important;font-size:12px!important}header{height:43px!important}.menu-icon{display:none!important}#tabs{height:32px!important}.tab{padding:7px 11px!important}main{height:calc(100dvh - 75px);overflow:auto;padding:8px 10px 14px!important}.sheet-title{display:flex!important;align-items:center!important;gap:9px!important}.sheet-title h1{font-size:16px!important}.sheet-title span{margin:0!important}.controls{margin:7px 0!important}.grid-wrap{max-height:calc(100dvh - 180px)}th,td{padding:6px 8px!important}.home-card{min-height:75px!important;padding:9px!important}.home-card b{font-size:20px!important}dialog,.agent-items-dialog{max-height:calc(100dvh - 14px)!important}.fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Compact, native-feeling phone purchase experience. */
@media(max-width:760px){
  header{gap:8px!important;padding:0 10px!important}.menu-icon{width:38px!important;height:38px!important;padding:0!important;border-radius:8px!important}
  .crumb{font-size:14px!important}.toolbar{margin-left:auto!important;gap:6px!important}.toolbar button{min-height:36px!important;padding:6px 10px!important;border-radius:7px!important}
  #tabs{padding-left:10px!important;height:36px!important}.tab{padding:8px 12px!important;font-size:13px!important}
  main{padding:10px!important}.sheet-title h1{font-size:20px!important;line-height:1.2!important}.sheet-title span{font-size:13px!important}
  #editor{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 28px)!important;border-radius:16px!important}
  #editor form{display:flex!important;max-height:calc(100dvh - 28px)!important;min-height:0!important;flex-direction:column!important;padding:16px!important;overflow:hidden!important}
  #editor .modal-head{flex:0 0 auto!important;top:auto!important;margin-bottom:12px!important;padding:0 0 11px!important}.modal-head strong{font-size:17px!important}.modal-head button{width:34px!important;height:34px!important;border-radius:8px!important;background:#f3f7f8!important}
  #editor #fields{min-height:0!important;overflow-y:auto!important;padding:0 1px 8px!important}.fields{gap:10px!important}.field{font-size:13px!important}.field input{height:42px!important;border-radius:8px!important;font-size:16px!important}
  #editor #batchRows{gap:8px!important}.batch-row{box-shadow:none!important}.batch-row .product-name{font-size:15px!important;font-weight:600!important}.batch-row [name="qty"]{font-size:17px!important}.batch-row .price-cell{font-weight:700!important;font-size:18px!important}
  #editor .purchase-summary{flex:0 0 auto!important;margin:8px 0 0!important;padding:10px 12px!important;border-radius:10px!important}.purchase-summary b{font-size:18px!important}
  #editor .add-more{flex:0 0 auto!important;margin:8px 0 0!important;min-height:40px!important;border-radius:8px!important}
  #editor .actions{flex:0 0 auto!important;position:static!important;margin-top:8px!important;padding:0!important}.actions button{min-height:42px!important;border-radius:8px!important}.actions .primary{flex:1!important}
  input[type=number]{appearance:textfield!important;-moz-appearance:textfield!important}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none!important;margin:0!important}
  .grid-wrap:has(#grid tbody td[colspan]){min-height:110px!important}.grid-wrap:has(#grid tbody td[colspan]) table{min-width:0!important}.grid-wrap:has(#grid tbody td[colspan]) td{white-space:normal!important;text-align:center!important;padding:28px 12px!important}
}

/* Daily purchase panel: reduce empty space and make totals easier to scan. */
.grid-wrap:has(.agent-daily-grid){min-height:0!important;max-width:1440px;margin:0 auto 18px;border-radius:11px;overflow:auto;background:linear-gradient(180deg,#fff,#fbfefe);box-shadow:0 9px 24px #1c48500e}.agent-daily-grid{min-width:920px!important}.agent-daily-grid thead th{height:44px;background:linear-gradient(90deg,#eaf7f5,#f7fbfc)!important;color:#31556b;font-size:13px}.agent-daily-grid tbody tr{transition:background .16s}.agent-daily-grid tbody tr:hover{background:#f0fbf8!important}.agent-daily-grid td{height:48px;padding:9px 12px!important}.agent-daily-grid td:first-child b{color:#21465d}.agent-daily-grid .unpaid{background:#fff1f1;color:#d95150;border-radius:16px;font-weight:700}.daily-order-link{border-radius:16px!important;padding:5px 10px!important;box-shadow:none!important}
@media(max-width:760px){.grid-wrap:has(.agent-daily-grid){margin:0 0 12px!important;border:0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important}.agent-daily-grid{display:block!important;min-width:0!important;width:100%!important;background:transparent!important}.agent-daily-grid thead{display:none!important}.agent-daily-grid tbody{display:grid!important;gap:9px}.agent-daily-grid tbody tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;overflow:hidden;border:1px solid #d9e9e7!important;border-radius:10px;background:#fff!important;box-shadow:0 4px 14px #163b470c}.agent-daily-grid td{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:43px!important;height:auto!important;padding:9px 10px!important;border:0!important;border-bottom:1px solid #e9f0f1!important;white-space:normal!important;text-align:right!important}.agent-daily-grid td:before{content:attr(data-label);margin-right:8px;color:#78909e;font-size:12px;font-weight:600;text-align:left}.agent-daily-grid td:nth-child(1),.agent-daily-grid td:nth-child(2){background:#f4fbfa}.agent-daily-grid td:nth-child(1){grid-column:1/-1;min-height:38px!important}.agent-daily-admin td:nth-child(2){grid-column:1/-1}.agent-daily-agent td:nth-child(1){grid-column:1/-1}.agent-daily-grid td:nth-last-child(-n+2){border-bottom:0}.agent-daily-grid td.unpaid{margin:5px 8px;padding:5px 9px!important;min-height:32px!important}.agent-daily-grid .daily-order-link{max-width:65vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agent-daily-grid .muted{font-size:12px}.grid-wrap:has(.agent-daily-grid):after{display:none!important}}

/* Explicit desktop container class avoids a full-width, sparse daily summary table. */
@media(min-width:761px){
  .grid-wrap.agent-daily-wrap{width:min(1440px,100%)!important;min-height:0!important;margin:0 auto 20px!important;border:1px solid #d8e8e8!important;border-radius:10px!important;overflow:hidden!important;background:#fff!important;box-shadow:0 8px 25px #153d4a12!important}
  .agent-daily-grid{width:100%!important;min-width:0!important;table-layout:fixed!important}
  .agent-daily-admin th:nth-child(1),.agent-daily-admin td:nth-child(1){width:12%}.agent-daily-admin th:nth-child(2),.agent-daily-admin td:nth-child(2){width:12%}.agent-daily-admin th:nth-child(3),.agent-daily-admin td:nth-child(3){width:14%}.agent-daily-admin th:nth-child(4),.agent-daily-admin td:nth-child(4){width:10%}.agent-daily-admin th:nth-child(5),.agent-daily-admin td:nth-child(5){width:10%}.agent-daily-admin th:nth-child(6),.agent-daily-admin td:nth-child(6){width:15%}.agent-daily-admin th:nth-child(7),.agent-daily-admin td:nth-child(7){width:13%}.agent-daily-admin th:nth-child(8),.agent-daily-admin td:nth-child(8){width:7%}.agent-daily-admin th:nth-child(9),.agent-daily-admin td:nth-child(9){width:7%}
  .agent-daily-grid thead th{height:42px!important;padding:8px 12px!important;text-align:left!important;font-size:13px!important;vertical-align:middle!important}.agent-daily-grid thead th:nth-child(n+4){text-align:right!important}
  .agent-daily-grid td{height:44px!important;padding:8px 12px!important;vertical-align:middle!important;overflow:hidden;text-overflow:ellipsis}.agent-daily-grid td:nth-child(n+4){text-align:right!important}.agent-daily-grid td:nth-child(3){text-align:left!important}
  .agent-daily-grid tbody tr:nth-child(even) td{background:#fbfdfd!important}.agent-daily-grid tbody tr:hover td{background:#f0faf8!important}.agent-daily-grid .unpaid{padding:3px 8px!important;min-width:34px;text-align:right!important}
}
/* Purchase product autocomplete: show only matches instead of the browser's full datalist. */
.product-code-wrap{position:relative;min-width:0}.product-suggestions{position:absolute;z-index:50;left:0;right:0;top:calc(100% + 3px);max-height:240px;overflow:auto;padding:4px;background:#fff;border:1px solid #b9d9d8;border-radius:6px;box-shadow:0 8px 22px #173b4826}.product-suggestion{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;padding:6px 8px;border:0;border-radius:4px;background:#fff;color:#294d62;text-align:left;cursor:pointer}.product-suggestion:hover,.product-suggestion:focus{background:#eaf8f6;color:#087e74}.product-suggestion b{min-width:58px;font-weight:700}.product-suggestion span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#718696}
@media(max-width:768px){#editor #batchRows .batch-row .product-code-wrap{grid-column:1/-1!important;width:100%!important}.product-suggestions{position:fixed;left:18px;right:18px;max-height:34vh}.product-suggestion{min-height:40px;font-size:15px}}

/* 采购/调货记录：筛选与订单操作分层，减少工具栏拥挤。 */
.record-filters.record-filter-panel{display:block!important;padding:0!important;overflow:hidden;border:1px solid #d8e8e6!important;border-radius:11px!important;background:#fff!important;box-shadow:0 7px 22px #163f4b0c!important}
.record-filter-row{display:flex;align-items:center;gap:10px;padding:13px 15px;flex-wrap:wrap;background:linear-gradient(180deg,#fff,#fbfefe)}
.record-filter-row label{height:38px!important;padding:0!important;gap:7px!important;color:#50697b!important;font-weight:600}
.record-filter-row label:last-of-type{flex:1 1 270px;min-width:230px}
.record-filter-row label:last-of-type input{width:100%;min-width:180px}
.record-filter-row input,.record-filter-row select{height:38px!important;border-color:#c7d9dc!important;border-radius:7px!important;background:#fff!important;transition:border-color .15s,box-shadow .15s}
.record-filter-row input:focus,.record-filter-row select:focus{outline:0;border-color:#19ad9e!important;box-shadow:0 0 0 3px #16b8a619}
.record-filter-row>button{height:38px!important;padding:7px 16px!important;border-radius:7px!important}
.record-filter-row>button:first-of-type{border-color:#17ad9f;background:#eaf9f6;color:#087f75;font-weight:700}
.record-filter-row .filter-count{margin-left:auto!important;padding:5px 10px!important;border-radius:16px;background:#eef8f6;color:#658078!important;font-size:13px;white-space:nowrap}
.record-filter-row .filter-count b{color:#078f81;font-size:16px}
.record-action-row{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:55px;padding:9px 15px;border-top:1px solid #e5efee;background:#f7fbfa}
.record-action-row .pager{width:auto!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;gap:7px!important}
.record-action-row .pager button{height:34px!important;min-height:34px!important;border-radius:6px;padding:5px 12px!important}
.record-action-row .pager b{min-width:48px;text-align:center;color:#3b7280;font-weight:600}
.record-row-height-control{display:flex;align-items:center;gap:7px;color:#5c7482;font-size:12px;font-weight:600;white-space:nowrap}
.record-row-height-control input{width:112px;height:18px;accent-color:#16a99a;cursor:pointer}
.record-row-height-control output{min-width:36px;color:#168b80;font-variant-numeric:tabular-nums}
.record-action-buttons{display:flex;align-items:center;gap:8px;margin-left:auto}
.record-action-buttons button{height:36px!important;min-height:36px!important;border-radius:7px!important;padding:6px 14px!important}
.record-action-buttons .record-create-button{border-color:#b9d8d4;background:#fff;color:#168b80;font-weight:600}
.record-action-buttons .export-purchase-button{box-shadow:0 4px 11px #16a9992c}
.record-action-buttons .danger{background:#fff;color:#ce4551;border-color:#edc9cd}
.record-action-buttons .danger:hover{background:#fff4f5}
@media(max-width:760px){.record-filter-row{padding:10px;gap:8px}.record-filter-row label{flex:1 1 calc(50% - 4px)!important;min-width:calc(50% - 4px)!important}.record-filter-row label:last-of-type{flex-basis:100%!important;min-width:100%!important}.record-filter-row .filter-count{width:auto!important;margin-left:auto!important}.record-action-row{align-items:stretch;padding:9px 10px;flex-direction:column}.record-action-row .pager{justify-content:space-between!important}.record-row-height-control{justify-content:center}.record-row-height-control input{flex:1;max-width:220px}.record-action-buttons{width:100%;margin-left:0;justify-content:flex-end;flex-wrap:wrap}.record-action-buttons button{flex:1 1 auto}}
@media(max-width:430px){.record-filter-row label{flex-basis:100%!important;min-width:100%!important}.record-filter-row>button{flex:1}.record-filter-row .filter-count{flex:0 0 auto}.record-action-buttons button{width:100%;flex-basis:100%}}

.record-action-buttons .agent-template-button{border-color:#b8d9d4;background:#fff;color:#168b80;font-weight:600}
.record-action-buttons .agent-import-button{border-color:#168f82;background:#e9f8f5;color:#087e74;font-weight:700}
.agent-order-importer{width:min(620px,calc(100vw - 30px))}
.agent-import-intro{display:grid;gap:5px;margin:0 0 14px;padding:13px 15px;border:1px solid #d4e9e5;border-radius:9px;background:#f1faf8;color:#5c7380}
.agent-import-intro b{color:#1b615a;font-size:15px}
.agent-import-intro span{line-height:1.65}
.agent-template-download{display:inline-flex;align-items:center;justify-content:center;min-height:38px;margin-bottom:14px;padding:7px 13px;border:1px solid #18aa9d;border-radius:7px;background:#fff;color:#128b80;text-decoration:none;font-weight:700}
.agent-template-download:hover{background:#eaf9f6}
.agent-import-file{padding:13px;border:1px dashed #b9d8d4;border-radius:8px;background:#fbfefe}
.agent-import-file input{margin-top:5px;background:#fff}

/* 代理价格分页：始终在价格面板内显示。 */
.price-matrix-toolbar+.pager{display:none!important}
.price-pagination{display:flex;align-items:center;gap:12px;margin-left:auto;padding-left:12px;border-left:1px solid #d5e5e3}
.price-pagination .price-range{color:#6b8190;font-size:12px;white-space:nowrap}
.price-pagination .price-range b{color:#128d81;font-size:15px}
.price-pagination .pager{width:auto!important;margin:0!important;gap:6px}
.price-pagination .pager button{min-height:34px;padding:6px 11px;border-radius:6px}
.price-pagination .pager button:not(:disabled){border-color:#afd8d3;color:#12877d;background:#fff}
.price-pagination .pager b{min-width:88px;text-align:center;color:#3d6f7b;white-space:nowrap}
@media(max-width:1100px){.price-pagination{width:100%;margin-left:0;padding:9px 0 0;border-left:0;border-top:1px solid #dce9e7;justify-content:space-between}}
@media(max-width:620px){.price-pagination{align-items:stretch;flex-direction:column;gap:7px}.price-pagination .pager{justify-content:space-between!important}.price-pagination .pager button{flex:1}}

/* 订单明细页：移除重复页签，扩大产品信息区并固定操作列。 */
#tabs.record-tabs-hidden{display:none!important}
body.record-view-active main{padding-top:11px!important}
body.record-view-active .sheet-title{margin:0 0 7px!important;padding:0!important;gap:12px!important}
body.record-view-active .sheet-title h1{font-size:20px!important}
body.record-view-active .sheet-title span{font-size:12px!important}
body.record-view-active .record-filter-panel{margin:0 0 9px!important}
body.record-view-active .record-filter-row{padding:9px 12px;gap:8px}
body.record-view-active .record-filter-row label{height:34px!important}
body.record-view-active .record-filter-row input,body.record-view-active .record-filter-row select{height:34px!important}
body.record-view-active .record-filter-row>button{height:34px!important;min-height:34px!important;padding:5px 14px!important}
body.record-view-active .record-action-row{min-height:45px;padding:6px 12px}
body.record-view-active .record-action-buttons button{height:33px!important;min-height:33px!important;padding:5px 13px!important}
.record-orders-grid{width:100%;min-width:1370px;table-layout:fixed}
.record-orders-admin th:nth-child(1),.record-orders-admin td:nth-child(1){width:46px;text-align:center}
.record-orders-admin th:nth-child(2),.record-orders-admin td:nth-child(2){width:90px}
.record-orders-admin th:nth-child(3),.record-orders-admin td:nth-child(3){width:100px}
.record-orders-admin th:nth-child(4),.record-orders-admin td:nth-child(4){width:110px}
.record-orders-admin th:nth-child(5),.record-orders-admin td:nth-child(5){width:92px}
.record-orders-admin th:nth-child(6),.record-orders-admin td:nth-child(6){width:168px}
.record-orders-admin th:nth-child(7),.record-orders-admin td:nth-child(7){width:70px}
.record-orders-admin th:nth-child(8),.record-orders-admin td:nth-child(8){width:90px}
.record-orders-admin th:nth-child(9),.record-orders-admin td:nth-child(9){width:100px}
.record-orders-admin th:nth-child(10),.record-orders-admin td:nth-child(10){width:200px}
.record-orders-admin th:nth-child(11),.record-orders-admin td:nth-child(11){width:150px}
.record-orders-admin th:nth-child(12),.record-orders-admin td:nth-child(12){width:155px}
.record-orders-agent th:nth-child(1),.record-orders-agent td:nth-child(1){width:110px}
.record-orders-agent th:nth-child(2),.record-orders-agent td:nth-child(2){width:105px}
.record-orders-agent th:nth-child(3),.record-orders-agent td:nth-child(3){width:150px}
.record-orders-agent th:nth-child(4),.record-orders-agent td:nth-child(4){width:95px}
.record-orders-agent th:nth-child(5),.record-orders-agent td:nth-child(5){width:300px}
.record-orders-agent th:nth-child(6),.record-orders-agent td:nth-child(6){width:75px}
.record-orders-agent th:nth-child(7),.record-orders-agent td:nth-child(7){width:95px}
.record-orders-agent th:nth-child(8),.record-orders-agent td:nth-child(8){width:105px}
.record-orders-agent th:nth-child(9),.record-orders-agent td:nth-child(9){width:160px}
.record-orders-agent th:nth-child(10),.record-orders-agent td:nth-child(10){width:130px}
.record-orders-agent th:nth-child(11),.record-orders-agent td:nth-child(11){width:120px}
.record-orders-grid .record-product-cell{white-space:normal!important;line-height:1.25;color:#29475c}
.record-orders-grid .record-product-cell b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.record-orders-grid .record-product-cell small{display:block;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8193a0;font-size:11px}
.record-orders-grid th:last-child,.record-orders-grid td.record-operation-cell{position:sticky;right:0;z-index:3;background:#fff;box-shadow:-5px 0 10px #1c40500a}
.record-orders-grid th:last-child{z-index:5;background:#edf8f7}
.record-orders-grid tbody tr:nth-child(even) td.record-operation-cell{background:#fbfdfd}
.record-orders-grid tbody tr:hover td.record-operation-cell{background:#f4fbfa!important}
.record-orders-grid .record-operation-cell{white-space:nowrap;text-align:center}
.record-orders-grid .record-operation-cell button{min-height:30px!important;height:30px!important;padding:3px 8px!important;font-size:12px}
:root{--record-row-height:42px}
.record-orders-grid tbody tr:not(.order-batch-footer) td{height:var(--record-row-height)!important;padding-top:5px!important;padding-bottom:5px!important}
.order-item-context{display:flex;align-items:center;gap:18px;padding:11px 13px;border:1px solid #cfe6e2;border-radius:8px;background:#f1faf8;color:#607987}
.order-item-context b{color:#214c61}
.order-item-price-note{margin:0;padding:9px 11px;border-radius:7px;background:#fff8e6;color:#7d6a39;font-size:12px}
@media(max-width:760px){.order-item-context{align-items:flex-start;gap:7px;flex-direction:column}}
.record-orders-admin .order-batch-footer .batch-order-action{height:auto!important;min-height:54px!important;padding:6px 14px!important;flex-wrap:wrap}
.order-finance-summary{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.order-finance-summary>span{display:inline-flex;align-items:center;gap:4px;min-height:28px;padding:4px 7px;border:1px solid #d9e9e7;border-radius:6px;background:#fff;color:#6b818d;font-size:11px;white-space:nowrap}
.order-finance-summary b{color:#344f61;font-size:12px;font-variant-numeric:tabular-nums}
.order-finance-summary .settlement-due{border-color:#f0d4ca;background:#fff8f4}
.order-finance-summary .settlement-due b{color:#df5846}
.profit-positive{color:#078c7f!important}
.profit-negative{color:#d2474e!important}
.actual-settlement-button{min-height:23px!important;height:23px!important;padding:1px 6px!important;border-color:#72c9be!important;background:#eaf9f6!important;color:#087f74!important;font-size:11px!important;font-weight:700}
.settlement-context{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;padding:12px 13px;border:1px solid #cfe6e2;border-radius:8px;background:#f1faf8;color:#607987}
.settlement-context span{display:flex;justify-content:space-between;gap:8px}
.settlement-context b{color:#214c61}
.settlement-context strong{color:#df5846}
.cost-toolbar{padding:11px 12px;border:1px solid #d7e8e5;border-radius:9px;background:#fff;box-shadow:0 5px 16px #183f4a0c;flex-wrap:wrap}
.cost-search{display:flex;align-items:center;gap:6px;min-width:280px;padding:0 9px;border:1px solid #c9dcde;border-radius:7px;color:#278f84;background:#fbfefe}
.cost-search input{width:100%;height:36px;border:0;outline:0;background:transparent;font:inherit;color:#344f61}
.cost-count{margin-left:auto;color:#718793;font-size:12px}.cost-count b{color:#078c7f;font-size:15px}
.cost-management-grid{min-width:900px;table-layout:fixed}
.cost-management-grid th:nth-child(1),.cost-management-grid td:nth-child(1){width:110px}
.cost-management-grid th:nth-child(2),.cost-management-grid td:nth-child(2){width:280px}
.cost-management-grid th:nth-child(3),.cost-management-grid td:nth-child(3){width:190px}
.cost-management-grid th:nth-child(n+4),.cost-management-grid td:nth-child(n+4){width:140px;text-align:right}
.cost-management-grid td{height:48px}
.cost-price-input{width:112px;padding:7px 9px;border:1px solid #bcd5d7;border-radius:6px;text-align:right;color:#274b5f;background:#fff8e6;font:inherit}
.cost-price-input:focus{outline:2px solid #9adfd6;border-color:#16a99a;background:#fff}
@media(max-width:900px){.order-finance-summary{width:100%;justify-content:flex-start}.batch-items{margin-right:0}.cost-search{min-width:0;flex:1 1 220px}.cost-count{width:100%;margin-left:0;text-align:right}}
@media(max-width:760px){.settlement-context{grid-template-columns:1fr}.record-orders-admin .order-batch-footer .batch-order-action{align-items:flex-end!important;flex-direction:column}.order-finance-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.order-finance-summary>span{justify-content:space-between}.cost-toolbar .pager{width:100%}.cost-management-grid{min-width:760px}}
@media(max-width:760px){body.record-view-active main{padding-top:8px!important}body.record-view-active .sheet-title{display:block!important;margin-bottom:6px!important}body.record-view-active .sheet-title span{margin-top:2px!important}.record-orders-grid{min-width:1260px}.record-orders-grid .record-product-cell small{font-size:10px}}
.batch-row.duplicate-product-row{background:#fff1f1;border-radius:6px}.batch-row.duplicate-product-row .product-code-input{border-color:#e5484d!important;box-shadow:0 0 0 2px #e5484d20}.batch-row.duplicate-product-row .product-name{color:#c9363e;font-weight:700}
.app-confirm .app-alert-actions{gap:10px}.app-confirm .app-alert-actions button{min-width:96px}.app-confirm #appConfirmCancel{background:#f7f9fa;color:#536a7b;box-shadow:none}.app-confirm #appConfirmAccept{font-weight:700}
