:root{--nav:#294f7d;--nav2:#3f6593;--blue:#2f80ed;--text:#0f2745;--muted:#7f8fa6;--line:#e7edf5;--bg:#f3f6fa;--card:#fff;--soft:#f8fafd;--red:#ef5350;--green:#20a162;--orange:#f59e0b}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px}button,input,select,textarea{font-family:inherit}.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#294f7d,#3f6593)}.login-card{width:380px;background:#fff;border-radius:16px;box-shadow:0 18px 60px rgba(0,0,0,.22);padding:32px}.login-title{text-align:center;font-size:26px;font-weight:800;color:var(--nav);margin-bottom:8px}.login-sub{text-align:center;color:var(--muted);margin-bottom:26px}.login-card input{width:100%;height:42px;border:1px solid var(--line);border-radius:8px;padding:0 12px;margin-bottom:12px}.app{display:flex;height:100vh;overflow:hidden}.side{width:250px;flex:0 0 250px;background:var(--nav);color:white;padding:18px 14px;overflow:auto}.logo{text-align:center;font-size:20px;font-weight:800;margin:4px 0 22px;cursor:pointer;user-select:none}.logo:hover{opacity:.92}.menu-title{height:38px;display:flex;align-items:center;gap:10px;padding:0 14px;border-radius:7px;margin-top:8px;font-weight:700;cursor:pointer;user-select:none}.menu-title.active,.menu-title:hover{background:var(--nav2)}.menu-arrow{width:14px;display:inline-block;transition:transform .18s}.menu-group.collapsed .menu-arrow{transform:rotate(-90deg)}.sub-wrap{overflow:hidden;max-height:260px;transition:max-height .18s ease}.menu-group.collapsed .sub-wrap{max-height:0}.sub{padding-left:42px;line-height:34px;font-weight:600;border-radius:7px;color:#dce8f6;cursor:pointer}.sub:hover,.sub.on{background:rgba(255,255,255,.10);color:#fff}.main{flex:1;min-width:0;display:flex;flex-direction:column}.top{height:52px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.brand{font-size:16px;font-weight:700}.pill{display:inline-block;background:#edf2f8;color:#55708d;border-radius:14px;padding:4px 12px;margin-left:12px;font-size:12px}.tabs{height:42px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:end;padding:0 20px;gap:4px;overflow:hidden}.tab{height:36px;padding:10px 12px;border:1px solid var(--line);border-bottom:none;border-radius:8px 8px 0 0;color:#4f6b89;background:#fff;white-space:nowrap;cursor:pointer;flex:1 1 118px;min-width:64px;max-width:168px;display:flex;align-items:center;justify-content:center;gap:6px;overflow:hidden}.tab:first-child{flex:0 0 72px}.tab.active{color:var(--blue);font-weight:700}.tab-text{min-width:0;overflow:hidden;text-overflow:ellipsis}.tab-close{flex:0 0 auto;color:#8aa0b8;font-weight:700}.tab-close:hover{color:var(--red)}.work{flex:1;min-height:0;padding:18px;overflow:hidden}.module-frame{width:100%;height:100%;border:none;border-radius:14px;background:#fff;box-shadow:0 6px 20px rgba(31,53,86,.05)}.page{background:#fff;border-radius:14px;box-shadow:0 6px 20px rgba(31,53,86,.05);overflow:hidden}.toolbar{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.title{font-size:22px;font-weight:800}.hint{color:var(--muted);margin-top:6px}.btn{border:1px solid var(--line);background:#fff;border-radius:7px;padding:9px 16px;color:#18314f;font-weight:600;cursor:pointer}.btn.primary{background:var(--blue);border-color:var(--blue);color:white}.btn.danger{color:var(--red);border-color:#ffd8d8;background:#fffafa}.btn.text{border:none;background:transparent;color:var(--blue);padding:4px 8px}.query{padding:16px 20px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1.4fr 1fr 1fr auto;gap:12px;align-items:center}.query input,.query select{height:38px;border:1px solid var(--line);border-radius:7px;padding:0 12px;outline:none;color:var(--text);background:white}.list{padding:0 20px 20px;overflow:auto}.table{width:100%;border-collapse:collapse}.table th{height:42px;background:#f8fafd;color:#61738a;text-align:left;font-weight:700;border-bottom:1px solid var(--line);padding:0 12px;white-space:nowrap}.table td{height:50px;border-bottom:1px solid var(--line);padding:0 12px;white-space:nowrap}.code{color:#6d7f95}.tag{display:inline-block;border:1px solid #dce8f6;background:#f7fbff;color:#55708d;border-radius:999px;padding:3px 9px;font-size:12px}.tag.ok{color:var(--green);background:#f0fbf6}.tag.warn{color:#b26b00;background:#fff6e8}.tag.danger{color:var(--red);background:#fff2f2}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;padding:18px}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px}.num{font-size:24px;font-weight:800;margin-top:8px}.mask{position:fixed;inset:0;background:rgba(15,39,69,.36);display:none;align-items:center;justify-content:center;padding:24px;z-index:10}.mask.show{display:flex}.modal{width:min(1080px,96vw);max-height:92vh;background:#fff;border-radius:14px;box-shadow:0 18px 60px rgba(0,0,0,.22);display:flex;flex-direction:column;overflow:hidden}.modal-head{min-height:64px;padding:10px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modal-title{font-size:18px;font-weight:800}.modal-sub{font-size:12px;color:#7c8fa6;margin-top:5px}.close{border:none;background:transparent;font-size:24px;color:#8aa0b8;cursor:pointer}.modal-body{overflow:auto;padding:18px 22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden}.col{padding:18px 24px}.col+.col{border-left:1px solid var(--line)}.group-title{font-size:15px;font-weight:800;margin:0 0 12px;color:#142d4c}.row{display:grid;grid-template-columns:120px 1fr;align-items:center;min-height:42px;border-bottom:1px solid #f0f3f8}.label{color:#6d7f95}.field{position:relative}.field input,.field select,.field textarea{width:100%;border:none;background:transparent;padding:10px 4px;outline:none;color:#132d4d;font-size:14px}.field textarea{height:64px;resize:none}.tabs2{display:flex;gap:4px;border-bottom:1px solid var(--line);padding:0 2px}.tabs2 button{padding:12px 18px;font-weight:700;color:#71849b;border:none;background:transparent;border-bottom:2px solid transparent;cursor:pointer}.tabs2 button.on{color:var(--blue);border-color:var(--blue)}.grid-wrap{overflow-x:auto}.grid{width:100%;border-collapse:collapse;min-width:900px}.grid th{background:#f8fafd;color:#61738a;text-align:left;font-weight:700;padding:12px;border-bottom:1px solid var(--line);white-space:nowrap}.grid td{padding:10px 0px;border-bottom:1px solid var(--line);white-space:nowrap}.grid input,.grid select{border:none;outline:none;width:100%;background:transparent;color:#132d4d}.add-row{padding:12px;color:var(--blue);cursor:pointer;font-weight:700}.total-bar{display:flex;justify-content:flex-end;gap:30px;padding:14px 12px;background:#fbfcfe;border-top:1px solid var(--line);font-weight:800}.modal-foot{display:flex;justify-content:space-between;gap:10px;padding:14px 20px;background:#fbfcfe;border-top:1px solid var(--line)}.foot-right{display:flex;gap:10px}.note{color:#7f8fa6;font-size:12px;align-self:center}.readonly input,.readonly select,.readonly textarea{pointer-events:none;color:#6d7f95}.page-body{padding:18px 20px}@media(max-width:900px){.side{display:none}.query,.form-grid,.cards{grid-template-columns:1fr}.col+.col{border-left:none;border-top:1px solid var(--line)}}
.query.wide{grid-template-columns:1.2fr 0.8fr 0.8fr 0.7fr 0.6fr 0.6fr auto}.query.compact{grid-template-columns:1.6fr 1fr auto}.check-list{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px}.check-list label{border:1px solid var(--line);border-radius:8px;padding:10px;background:#fbfcfe}.check-list input{margin-right:8px}.section-note{padding:10px 12px;border:1px dashed #cfd9e6;background:#fbfdff;border-radius:8px;color:#61738a;margin:12px 0}.badge{display:inline-block;background:#eef5ff;color:#2f80ed;border-radius:6px;padding:2px 7px;font-size:12px;font-weight:700}.summary-bar{display:flex;justify-content:flex-end;gap:24px;padding:12px 0;color:var(--text);font-weight:700;border-top:1px solid var(--line);margin-top:8px}.summary-item{color:var(--muted)}.summary-item span{color:var(--text);font-weight:800}.dropdown{display:none;position:absolute;top:100%;left:0;right:0;margin-top:-1px;border:1px solid var(--line);border-top:none;background:#fff;border-radius:0 0 8px 8px;max-height:200px;overflow-y:auto;z-index:10}.dropdown-item{padding:10px 12px;cursor:pointer;color:var(--text)}.dropdown-item:hover{background:var(--soft)}@media(max-width:900px){.query.wide,.query.compact,.check-list{grid-template-columns:1fr}}
.query.doc-query{grid-template-columns:150px 150px minmax(280px,1fr) 150px auto;gap:10px;padding:14px 20px;background:linear-gradient(180deg,#fbfdff,#f6f9fd);border-bottom:1px solid #dfe8f3;box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}.query.doc-query.no-status{grid-template-columns:150px 150px minmax(320px,1fr) auto}.query.doc-query.production-query{grid-template-columns:150px 150px minmax(280px,1fr) 180px auto}.query-field{height:58px;border:1px solid #dbe5f1;border-radius:8px;background:#fff;display:flex;flex-direction:column;justify-content:center;padding:6px 10px;box-shadow:0 1px 2px rgba(31,53,86,.04)}.query-field span{font-size:12px;color:#6d7f95;font-weight:700;line-height:16px;margin-bottom:2px}.query-field input,.query-field select{width:100%;height:28px;border:none;border-radius:0;padding:0;background:transparent;color:#132d4d;font-size:14px}.query-field input:focus,.query-field select:focus{outline:none}.query-field:focus-within{border-color:#9dc5f8;box-shadow:0 0 0 3px rgba(47,128,237,.10)}.query-field.date-field{background:#f8fbff;border-color:#cdddf0}.query.doc-query .btn.primary{height:58px;min-width:88px;border-radius:8px;font-size:15px}@media(max-width:1100px){.query.doc-query,.query.doc-query.no-status,.query.doc-query.production-query{grid-template-columns:1fr 1fr}.query.doc-query .btn.primary{grid-column:1/-1}}@media(max-width:640px){.query.doc-query,.query.doc-query.no-status,.query.doc-query.production-query{grid-template-columns:1fr}}
.panel{display:none;padding:16px 0}.panel.on{display:block}.term-layout{display:grid;grid-template-columns:260px 1fr;gap:16px}.box{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}.box-head{padding:12px 14px;background:#f8fafd;border-bottom:1px solid var(--line);font-weight:800;display:flex;justify-content:space-between;align-items:center}.box-body{padding:12px 14px}.clause-row{display:grid;grid-template-columns:34px 1fr 48px;gap:8px;align-items:start;border-bottom:1px solid #f0f3f8;padding:8px 0}.clause-row:last-child{border-bottom:none}.clause-no{color:#6d7f95;padding-top:8px}.clause-row textarea{width:100%;height:44px;border:1px solid #eef2f7;border-radius:6px;padding:8px;resize:vertical;outline:none;color:#132d4d}.preview{max-width:820px;margin:0 auto;color:#111;font-family:'SimSun','Microsoft YaHei',serif}.preview h2{text-align:center;letter-spacing:8px}.preview table{width:100%;border-collapse:collapse;font-size:13px}.preview th,.preview td{border:1px solid #333;padding:6px}.btn.link{border:none;background:transparent;color:var(--blue);padding:4px 8px}.tabs2{margin-top:16px}
.user-menu{position:relative}.user-trigger{height:36px;border:1px solid var(--line);background:#fff;border-radius:7px;padding:0 10px;display:flex;align-items:center;gap:8px;color:#18314f;font-weight:700;cursor:pointer}.user-meta{font-size:12px;color:#6d7f95;font-weight:500}.user-caret{color:#8aa0b8}.user-dropdown{display:none;position:absolute;right:0;top:42px;width:132px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 10px 28px rgba(31,53,86,.16);padding:6px;z-index:20}.user-menu.open .user-dropdown{display:block}.user-dropdown button{width:100%;height:34px;border:0;background:transparent;border-radius:6px;text-align:left;padding:0 10px;color:#18314f;cursor:pointer}.user-dropdown button:hover{background:var(--soft);color:var(--blue)}.password-modal{width:min(520px,92vw)}.form-grid.single{grid-template-columns:1fr}.form-grid.single .col{border-left:none}.login-secret{-webkit-text-security:disc}
.grid input.number-center{text-align:center}
.sales-contract-detail-grid th:first-child,.sales-contract-detail-grid td:first-child{text-align:center;width:54px}
.sales-contract-detail-grid th:nth-child(5),.sales-contract-detail-grid td:nth-child(5){width:74px;min-width:74px;text-align:center}
.sales-contract-detail-grid th:nth-child(6),.sales-contract-detail-grid td:nth-child(6){width:76px;min-width:76px;text-align:center}
.sales-contract-detail-grid th:nth-child(7),.sales-contract-detail-grid td:nth-child(7),
.sales-contract-detail-grid th:nth-child(8),.sales-contract-detail-grid td:nth-child(8){width:96px;min-width:96px;text-align:center}
.sales-contract-detail-grid th:nth-child(13),.sales-contract-detail-grid td:nth-child(13){min-width:180px}
.sales-contract-detail-grid th:nth-child(14),.sales-contract-detail-grid td:nth-child(14){width:78px;min-width:78px;text-align:center}
.sales-contract-detail-grid th:nth-child(2),.sales-contract-detail-grid td:nth-child(2),
.sales-contract-detail-grid th:nth-child(3),.sales-contract-detail-grid td:nth-child(3){min-width:140px}
.sales-contract-detail-grid th:nth-child(10),.sales-contract-detail-grid td:nth-child(10),
.sales-contract-detail-grid th:nth-child(11),.sales-contract-detail-grid td:nth-child(11),
.sales-contract-detail-grid th:nth-child(15),.sales-contract-detail-grid td:nth-child(15),
.sales-contract-detail-grid th:nth-child(16),.sales-contract-detail-grid td:nth-child(16){min-width:120px}
.sales-contract-detail-grid td:nth-child(5) input,
.sales-contract-detail-grid td:nth-child(7) input,
.sales-contract-detail-grid td:nth-child(8) input,
.sales-contract-detail-grid td:nth-child(14) input,
.sales-contract-detail-grid td:nth-child(15) input{text-align:center}
.shipment-detail-grid{min-width:1380px}
.shipment-detail-grid th:first-child,.shipment-detail-grid td:first-child{text-align:center;width:54px}
.shipment-detail-grid th:nth-child(7),.shipment-detail-grid td:nth-child(7){width:92px}
.shipment-detail-grid th:nth-child(8),.shipment-detail-grid td:nth-child(8),
.shipment-detail-grid th:nth-child(9),.shipment-detail-grid td:nth-child(9),
.shipment-detail-grid th:nth-child(11),.shipment-detail-grid td:nth-child(11),
.shipment-detail-grid th:nth-child(12),.shipment-detail-grid td:nth-child(12){width:86px;text-align:center}
.shipment-detail-grid th:nth-child(10),.shipment-detail-grid td:nth-child(10){width:56px;text-align:center}
.shipment-detail-grid th:nth-child(13),.shipment-detail-grid td:nth-child(13){min-width:140px}
.shipment-detail-grid th:nth-child(2),.shipment-detail-grid td:nth-child(2){min-width:150px}
.shipment-detail-grid th:nth-child(4),.shipment-detail-grid td:nth-child(4){min-width:150px}
.outbound-detail-grid{min-width:1380px}
.outbound-detail-grid th:first-child,.outbound-detail-grid td:first-child{text-align:center;width:54px}
.outbound-detail-grid th:nth-child(8),.outbound-detail-grid td:nth-child(8),
.outbound-detail-grid th:nth-child(9),.outbound-detail-grid td:nth-child(9),
.outbound-detail-grid th:nth-child(10),.outbound-detail-grid td:nth-child(10),
.outbound-detail-grid th:nth-child(11),.outbound-detail-grid td:nth-child(11),
.outbound-detail-grid th:nth-child(12),.outbound-detail-grid td:nth-child(12){width:86px;text-align:center}
.outbound-detail-grid th:nth-child(2),.outbound-detail-grid td:nth-child(2){min-width:150px}
.outbound-detail-grid th:nth-child(3),.outbound-detail-grid td:nth-child(3){min-width:120px}
.outbound-detail-grid th:nth-child(13),.outbound-detail-grid td:nth-child(13){min-width:140px}
.outbound-detail-grid th:first-child,.outbound-detail-grid td:first-child{width:54px;min-width:54px;text-align:center}
.outbound-detail-grid th:nth-child(2),.outbound-detail-grid td:nth-child(2){width:76px;min-width:76px;text-align:center}
.outbound-detail-grid th:nth-child(3),.outbound-detail-grid td:nth-child(3){width:86px;min-width:86px}
.outbound-detail-grid th:nth-child(4),.outbound-detail-grid td:nth-child(4){min-width:160px}
.outbound-detail-grid th:nth-child(5),.outbound-detail-grid td:nth-child(5){min-width:180px}
.outbound-detail-grid th:nth-child(6),.outbound-detail-grid td:nth-child(6){width:82px;min-width:82px;text-align:center}
.outbound-detail-grid th:nth-child(7),.outbound-detail-grid td:nth-child(7){min-width:150px}
.outbound-detail-grid th:nth-child(8),.outbound-detail-grid td:nth-child(8){width:92px;min-width:92px;text-align:center}
.outbound-detail-grid th:nth-child(9),.outbound-detail-grid td:nth-child(9){min-width:120px}
.outbound-detail-grid th:nth-child(10),.outbound-detail-grid td:nth-child(10){width:76px;min-width:76px;text-align:center}
.outbound-detail-grid th:nth-child(11),.outbound-detail-grid td:nth-child(11),
.outbound-detail-grid th:nth-child(12),.outbound-detail-grid td:nth-child(12),
.outbound-detail-grid th:nth-child(13),.outbound-detail-grid td:nth-child(13){width:96px;min-width:96px;text-align:center}
.outbound-detail-grid th:nth-child(14),.outbound-detail-grid td:nth-child(14){min-width:140px}
.outbound-detail-grid th:nth-child(15),.outbound-detail-grid td:nth-child(15){width:82px;min-width:82px;text-align:center}
.outbound-detail-grid th:nth-child(16),.outbound-detail-grid td:nth-child(16){min-width:130px}
.outbound-detail-grid th:nth-child(17),.outbound-detail-grid td:nth-child(17){width:76px;min-width:76px;text-align:center}
.purchase-detail-grid th:first-child,.purchase-detail-grid td:first-child{text-align:center}
.purchase-header-grid{grid-template-columns:1fr 1fr}
.purchase-header-grid .col{padding:14px 22px}
.purchase-header-grid .group-title{height:22px;margin:0 0 10px}
.purchase-header-grid .row{grid-template-columns:118px minmax(0,1fr);min-height:44px}
.purchase-header-grid .col:nth-child(2){padding-top:46px}
.modal-head-right{display:flex;align-items:center;gap:12px;margin-left:auto}
.quick-lookup{border:1px solid #cdddf0;background:#f8fbff;border-radius:8px;padding:7px 10px;margin-bottom:0;min-width:430px}
.quick-lookup-title{font-weight:800;color:#18314f;margin-bottom:5px;font-size:12px;line-height:16px}
.quick-lookup-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center}
.quick-lookup-controls input{height:30px;border:1px solid #dbe5f1;border-radius:7px;background:#fff;padding:0 10px;outline:none;color:#132d4d;font-weight:700}
.quick-lookup-controls input:focus{border-color:#9dc5f8;box-shadow:0 0 0 3px rgba(47,128,237,.10)}
.quick-lookup-controls .btn{height:30px;padding:0 14px}
.delete-guard{display:flex;align-items:center;gap:10px;padding:6px 10px;border:1px solid #ffd8d8;background:#fffafa;border-radius:7px;color:#7f1d1d;font-size:13px}
.delete-guard-title{font-weight:800}
.delete-guard label{display:flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}
.delete-guard input{margin:0}
.modal-foot .btn:disabled{opacity:.45;cursor:not-allowed}
.btn.permission-disabled{opacity:.45;cursor:not-allowed}
.permission-query{grid-template-columns:minmax(130px,160px) minmax(220px,280px) minmax(260px,1fr) auto}
.permission-table{min-width:1180px}
.permission-table th:nth-child(n+3),.permission-table td:nth-child(n+3){text-align:center}
.permission-table select{height:32px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--text);padding:0 8px}
@media(max-width:900px){.purchase-header-grid{grid-template-columns:1fr}.purchase-header-grid .col:nth-child(2){padding-top:14px}.purchase-header-grid .col:nth-child(2) .row:first-child{border-top:none}.modal-head{align-items:flex-start;gap:10px}.modal-head-right{flex-wrap:wrap;justify-content:flex-end}.quick-lookup{min-width:min(430px,100%)}}
.detail-tabs{align-items:center;justify-content:space-between}
.detail-tabs .btn.text{border-bottom:0;color:var(--blue)}
.detail-tab-actions{display:flex;align-items:center;gap:8px}
.summary-bar.with-action{justify-content:space-between;align-items:center}
.summary-bar.with-action .summary-right{display:flex;justify-content:flex-end;gap:24px}.total-bar.with-action{justify-content:space-between;align-items:center}.total-bar.with-action .total-right{display:flex;justify-content:flex-end;gap:30px}.detail-bottom-actions{display:flex;justify-content:flex-start;padding:10px 2px 0}
.inline-import{display:flex;gap:8px;align-items:center}
.inline-import input{min-width:0;flex:1}
.inline-import .btn{flex:0 0 auto;white-space:nowrap}
.inline-check{display:flex;align-items:center;gap:8px;color:#132d4d;font-weight:600}
.inline-check input{width:auto}
.inbound-detail-grid{min-width:1280px}
.production-inbound-detail-grid{min-width:1040px}
.inbound-detail-grid th:first-child,.inbound-detail-grid td:first-child{text-align:center;width:54px}
.inbound-detail-grid th:nth-child(3),.inbound-detail-grid td:nth-child(3){min-width:150px}
.inbound-detail-grid th:nth-child(4),.inbound-detail-grid td:nth-child(4){min-width:150px}
.inbound-detail-grid th:nth-child(6),.inbound-detail-grid td:nth-child(6),
.inbound-detail-grid th:nth-child(8),.inbound-detail-grid td:nth-child(8),
.inbound-detail-grid th:nth-child(9),.inbound-detail-grid td:nth-child(9){width:92px;text-align:center}
.inbound-detail-grid th:nth-child(7),.inbound-detail-grid td:nth-child(7){width:46px;text-align:center}
.inbound-detail-grid th:nth-child(13),.inbound-detail-grid td:nth-child(13){min-width:140px}
.inbound-detail-grid th:nth-child(5),.inbound-detail-grid td:nth-child(5),
.inbound-detail-grid th:nth-child(13),.inbound-detail-grid td:nth-child(13){min-width:150px}
.inbound-detail-grid th:nth-child(7),.inbound-detail-grid td:nth-child(7),
.inbound-detail-grid th:nth-child(9),.inbound-detail-grid td:nth-child(9),
.inbound-detail-grid th:nth-child(10),.inbound-detail-grid td:nth-child(10){width:92px;text-align:center}
.inbound-detail-grid th:nth-child(8),.inbound-detail-grid td:nth-child(8){width:46px;text-align:center}
.inbound-detail-grid th:nth-child(12),.inbound-detail-grid td:nth-child(12){min-width:140px}
.production-form-grid .compact-remark-row{min-height:42px}
.production-form-grid{border-radius:10px 10px 0 0}
.production-form-grid .col{padding:14px 22px}
.production-form-grid .production-group-spacer{visibility:hidden}
.production-appendix-block{display:grid;grid-template-columns:120px 1fr;gap:0;border:1px solid var(--line);border-top:none;border-radius:0 0 10px 10px;margin-top:-1px;padding:12px 22px;background:#fff}
.production-appendix-block .label{padding-top:9px}
.production-appendix-block textarea{width:100%;min-height:118px;border:1px solid #edf2f7;border-radius:8px;padding:10px 12px;outline:none;color:#132d4d;font-size:14px;line-height:1.5;resize:vertical}
.production-detail-tabs{justify-content:space-between;align-items:center}
.production-summary{margin-top:0;padding:12px 2px}
.production-list-table th,.production-list-table td{vertical-align:middle}
.production-list-table th:nth-child(1),.production-list-table td:nth-child(1){width:82px;min-width:82px;text-align:center}
.production-list-table th:nth-child(2),.production-list-table td:nth-child(2){width:180px;min-width:180px}
.production-list-table th:nth-child(3),.production-list-table td:nth-child(3){width:112px;min-width:112px;text-align:center}
.production-list-table th:nth-child(4),.production-list-table td:nth-child(4){width:130px;min-width:130px}
.production-list-table th:nth-child(5),.production-list-table td:nth-child(5){width:130px;min-width:130px}
.production-list-table th:nth-child(6),.production-list-table td:nth-child(6){min-width:180px;white-space:normal}
.production-list-table th:nth-child(7),.production-list-table td:nth-child(7){width:58px;min-width:58px;text-align:center}
.production-list-table th:nth-child(8),.production-list-table td:nth-child(8){min-width:160px;white-space:normal}
.production-list-table th:nth-child(9),.production-list-table td:nth-child(9){min-width:190px;white-space:normal}
.production-list-table th:nth-child(10),.production-list-table td:nth-child(10){width:150px;min-width:150px}
.production-list-table th:nth-child(11),.production-list-table td:nth-child(11){width:100px;min-width:100px;text-align:right}
.production-list-table th:nth-child(12),.production-list-table td:nth-child(12){width:130px;min-width:130px}
.production-list-table th:nth-child(13),.production-list-table td:nth-child(13){width:72px;min-width:72px;text-align:center}
.production-detail-list-row td{white-space:normal}
.production-list-main{cursor:pointer;line-height:1.55}
.production-list-no{font-weight:800;color:#18314f;margin-bottom:4px}
.production-list-meta{font-size:12px;color:#61738a;white-space:normal}
.mini-detail-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px;background:#fff}
.mini-detail-table th{height:28px;padding:4px 6px;background:#f8fafd;color:#61738a;border:1px solid #edf2f7;text-align:left;white-space:normal}
.mini-detail-table td{height:28px;padding:4px 6px;border:1px solid #edf2f7;white-space:normal;word-break:break-all;color:#132d4d}
.mini-detail-table .number-cell{text-align:right;white-space:nowrap}
.mini-detail-table .mini-total td,.mini-detail-table tr.mini-total td{background:#fbfcfe;font-weight:800;color:#18314f}
.production-raw-mini th:nth-child(1),.production-raw-mini td:nth-child(1),
.production-output-mini th:nth-child(1),.production-output-mini td:nth-child(1){width:34px;text-align:center}
.production-raw-mini th:nth-child(5),.production-raw-mini td:nth-child(5){width:76px}
.production-output-mini th:nth-child(4),.production-output-mini td:nth-child(4),
.production-output-mini th:nth-child(5),.production-output-mini td:nth-child(5),
.production-output-mini th:nth-child(6),.production-output-mini td:nth-child(6),
.production-output-mini th:nth-child(7),.production-output-mini td:nth-child(7),
.production-output-mini th:nth-child(8),.production-output-mini td:nth-child(8){width:66px}
.mini-empty{color:#8aa0b8;font-size:12px;padding:8px;border:1px dashed #d8e2ef;border-radius:6px;background:#fbfdff}
.production-raw-grid{min-width:1120px}
.production-raw-grid th:first-child,.production-raw-grid td:first-child{text-align:center;width:54px}
.production-raw-grid th:nth-child(2),.production-raw-grid td:nth-child(2){min-width:180px}
.production-raw-grid th:nth-child(3),.production-raw-grid td:nth-child(3){min-width:220px}
.production-raw-grid th:nth-child(4),.production-raw-grid td:nth-child(4){min-width:170px}
.production-raw-grid th:nth-child(5),.production-raw-grid td:nth-child(5){width:120px;text-align:center}
.production-raw-grid th:nth-child(6),.production-raw-grid td:nth-child(6){min-width:180px}
.production-material-grid{min-width:1180px}
.production-material-grid th:first-child,.production-material-grid td:first-child{text-align:center;width:54px}
.production-material-grid th:nth-child(2),.production-material-grid td:nth-child(2){min-width:180px}
.production-material-grid th:nth-child(3),.production-material-grid td:nth-child(3){min-width:220px}
.production-material-grid th:nth-child(4),.production-material-grid td:nth-child(4),
.production-material-grid th:nth-child(5),.production-material-grid td:nth-child(5),
.production-material-grid th:nth-child(6),.production-material-grid td:nth-child(6),
.production-material-grid th:nth-child(7),.production-material-grid td:nth-child(7),
.production-material-grid th:nth-child(8),.production-material-grid td:nth-child(8){width:120px;text-align:center}
.query.stock-query{grid-template-columns:150px 150px minmax(280px,1fr) 130px 170px auto}
.stock-table{min-width:1180px}
.stock-table .number-cell{text-align:center}
.query.count-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(240px,1fr) minmax(160px,200px) minmax(130px,150px) auto}
.query.count-query .btn.primary{height:58px;min-width:88px;border-radius:8px;font-size:15px}
.count-table{min-width:820px}
.count-table th:nth-child(4),.count-table td:nth-child(4){text-align:center}
.count-detail-grid{min-width:1680px}
.count-detail-grid th:first-child,.count-detail-grid td:first-child{text-align:center;width:54px}
.count-detail-grid th:nth-child(2),.count-detail-grid td:nth-child(2){min-width:120px}
.count-detail-grid th:nth-child(3),.count-detail-grid td:nth-child(3),
.count-detail-grid th:nth-child(4),.count-detail-grid td:nth-child(4),
.count-detail-grid th:nth-child(10),.count-detail-grid td:nth-child(10),
.count-detail-grid th:nth-child(11),.count-detail-grid td:nth-child(11),
.count-detail-grid th:nth-child(14),.count-detail-grid td:nth-child(14){min-width:110px}
.count-detail-grid th:nth-child(5),.count-detail-grid td:nth-child(5),
.count-detail-grid th:nth-child(6),.count-detail-grid td:nth-child(6),
.count-detail-grid th:nth-child(7),.count-detail-grid td:nth-child(7),
.count-detail-grid th:nth-child(15),.count-detail-grid td:nth-child(15){min-width:150px}
.count-detail-grid th:nth-child(8),.count-detail-grid td:nth-child(8),
.count-detail-grid th:nth-child(9),.count-detail-grid td:nth-child(9),
.count-detail-grid th:nth-child(12),.count-detail-grid td:nth-child(12),
.count-detail-grid th:nth-child(13),.count-detail-grid td:nth-child(13),
.count-detail-grid th:nth-child(16),.count-detail-grid td:nth-child(16),
.count-detail-grid th:nth-child(17),.count-detail-grid td:nth-child(17){text-align:center;width:86px}
.production-issue-grid{min-width:1320px}
.production-issue-grid th:first-child,.production-issue-grid td:first-child{text-align:center;width:54px}
.production-issue-grid th:nth-child(8),.production-issue-grid td:nth-child(8){text-align:center;width:76px}
.production-issue-grid th:nth-child(9),.production-issue-grid td:nth-child(9),
.production-issue-grid th:nth-child(10),.production-issue-grid td:nth-child(10){text-align:center;width:96px}
.production-issue-grid th:nth-child(2),.production-issue-grid td:nth-child(2){min-width:105px}
.production-issue-grid th:nth-child(3),.production-issue-grid td:nth-child(3),
.production-issue-grid th:nth-child(11),.production-issue-grid td:nth-child(11){min-width:150px}
.production-issue-grid th:nth-child(4),.production-issue-grid td:nth-child(4){min-width:190px}
.production-issue-grid th:nth-child(5),.production-issue-grid td:nth-child(5){min-width:150px}
.production-issue-grid th:nth-child(6),.production-issue-grid td:nth-child(6),
.production-issue-grid th:nth-child(7),.production-issue-grid td:nth-child(7){min-width:110px}
.production-completion-grid{min-width:1580px}
.production-completion-grid th:first-child,.production-completion-grid td:first-child{text-align:center;width:54px}
.production-completion-grid th:nth-child(7),.production-completion-grid td:nth-child(7),
.production-completion-grid th:nth-child(8),.production-completion-grid td:nth-child(8),
.production-completion-grid th:nth-child(10),.production-completion-grid td:nth-child(10),
.production-completion-grid th:nth-child(11),.production-completion-grid td:nth-child(11),
.production-completion-grid th:nth-child(13),.production-completion-grid td:nth-child(13){text-align:center;width:110px}
.production-completion-grid th:nth-child(9),.production-completion-grid td:nth-child(9),
.production-completion-grid th:nth-child(12),.production-completion-grid td:nth-child(12){text-align:center;width:74px;min-width:74px}
.production-completion-grid th:nth-child(2),.production-completion-grid td:nth-child(2),
.production-completion-grid th:nth-child(5),.production-completion-grid td:nth-child(5){min-width:120px}
.production-completion-grid th:nth-child(3),.production-completion-grid td:nth-child(3),
.production-completion-grid th:nth-child(14),.production-completion-grid td:nth-child(14){min-width:150px}
.production-completion-grid th:nth-child(4),.production-completion-grid td:nth-child(4){min-width:140px}
.production-completion-grid th:nth-child(6),.production-completion-grid td:nth-child(6){min-width:110px}
.production-completion-grid th:nth-child(16),.production-completion-grid td:nth-child(16){width:78px;text-align:center}
.number-rule-table .rule-input{width:120px;height:34px;border:1px solid var(--line);border-radius:6px;padding:0 9px;color:var(--text)}.number-rule-table td{height:58px}.number-rule-table .badge{min-width:90px;text-align:center}
button.add-row{display:block;width:100%;border:0;background:transparent;text-align:left}
.center-cell{text-align:center}
.customer-table{min-width:1180px}
.customer-table th:nth-child(1),.customer-table td:nth-child(1){width:120px}
.customer-table th:nth-child(2),.customer-table td:nth-child(2){min-width:220px}
.customer-table th:nth-child(6),.customer-table td:nth-child(6),
.customer-table th:nth-child(7),.customer-table td:nth-child(7){text-align:center;width:130px}
.customer-table th:nth-child(8),.customer-table td:nth-child(8){text-align:center;width:90px}
.customer-table th:nth-child(9),.customer-table td:nth-child(9){text-align:center;width:90px}
.sales-delivery-row{min-height:42px}
.sales-delivery-row .field{padding:5px 0}
.sales-delivery-row select{height:34px;border:1px solid #e6edf5;border-radius:6px;padding:0 6px;background:#fff}
.sales-contract-list-table th:first-child,.sales-contract-list-table td:first-child,
.shipment-list-table th:first-child,.shipment-list-table td:first-child,
.outbound-list-table th:first-child,.outbound-list-table td:first-child{width:92px;min-width:92px;text-align:center}
.inbound-detail-grid th:nth-child(4),.inbound-detail-grid td:nth-child(4){width:82px;min-width:82px}
.inbound-detail-grid th:nth-child(10),.inbound-detail-grid td:nth-child(10){width:108px;min-width:108px;text-align:center}
.inbound-detail-grid th:nth-child(13),.inbound-detail-grid td:nth-child(13){min-width:150px}
.inbound-detail-grid th:nth-child(14),.inbound-detail-grid td:nth-child(14){width:132px;min-width:132px}
.inbound-detail-grid th:nth-child(3),.inbound-detail-grid td:nth-child(3){width:82px;min-width:82px}
.inbound-detail-grid th:nth-child(8),.inbound-detail-grid td:nth-child(8){width:180px;min-width:180px;text-align:left}
.inbound-detail-grid th:nth-child(10),.inbound-detail-grid td:nth-child(10){width:70px;min-width:70px;text-align:center}
.inbound-detail-grid td:nth-child(9) input,
.inbound-detail-grid td:nth-child(10) input,
.inbound-detail-grid td:nth-child(10) select,
.inbound-detail-grid td:nth-child(11) input,
.inbound-detail-grid td:nth-child(12) input,
.inbound-detail-grid td:nth-child(13) input,
.inbound-detail-grid td:nth-child(15) input{text-align:center}

/* Keep query conditions on one row; narrow screens can scroll horizontally. */
.query{grid-template-columns:minmax(220px,1.4fr) minmax(130px,1fr) minmax(130px,1fr) auto;overflow-x:auto}.query input,.query select{min-width:0}.query .btn{white-space:nowrap}.query.wide{grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(130px,.7fr) minmax(130px,.6fr) auto}.query.wide:has(> :nth-child(7)){grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(120px,.7fr) minmax(130px,.6fr) minmax(130px,.6fr) auto}.query.compact{grid-template-columns:minmax(220px,1.6fr) minmax(130px,1fr) auto}.query.doc-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(130px,150px) auto}.query.doc-query.no-status{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(320px,1fr) auto}.query.doc-query.production-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(150px,180px) auto}.query.doc-query .btn.primary{grid-column:auto}
@media(max-width:1100px){.query.doc-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(130px,150px) auto}.query.doc-query.no-status{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(320px,1fr) auto}.query.doc-query.production-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(150px,180px) auto}.query.doc-query .btn.primary{grid-column:auto}}
@media(max-width:900px){.query{grid-template-columns:minmax(220px,1.4fr) minmax(130px,1fr) minmax(130px,1fr) auto}.query.wide{grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(130px,.7fr) minmax(130px,.6fr) auto}.query.wide:has(> :nth-child(7)){grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(120px,.7fr) minmax(130px,.6fr) minmax(130px,.6fr) auto}.query.compact{grid-template-columns:minmax(220px,1.6fr) minmax(130px,1fr) auto}}
@media(max-width:640px){.query.doc-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(130px,150px) auto}.query.doc-query.no-status{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(320px,1fr) auto}.query.doc-query.production-query{grid-template-columns:minmax(130px,150px) minmax(130px,150px) minmax(280px,1fr) minmax(150px,180px) auto}}

.query.wide{grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(120px,.7fr) minmax(130px,.6fr) minmax(130px,.6fr) auto}
@media(max-width:900px){.query.wide{grid-template-columns:minmax(220px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) minmax(120px,.7fr) minmax(130px,.6fr) minmax(130px,.6fr) auto}}

body.entry-page{background:#fff}
body.entry-page>.page{display:none}
body.entry-page .mask{position:static;inset:auto;display:none;background:transparent;padding:0;z-index:auto}
body.entry-page .mask.show{display:block}
body.entry-page .modal{width:100%!important;max-height:none;border-radius:0;box-shadow:none}
body.entry-page .modal-head{min-height:70px;background:#fff}
body.entry-page .modal-body{overflow:visible;padding:18px 22px 24px}
body.entry-page .modal-foot{position:sticky;bottom:0;z-index:2}
body.entry-page .close{display:none}

.work{position:relative}
.module-frame{display:none}
.module-frame.active{display:block}

.dashboard-page{background:#f7f9fc;border-radius:14px;box-shadow:none;min-height:100%;padding:18px;overflow:auto}
.dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.dashboard-title{font-size:24px;font-weight:800;color:#0f2745}
.dashboard-sub{color:#6d7f95;margin-top:6px}
.dashboard-actions{display:flex;gap:10px;flex-wrap:wrap}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:14px}
.metric{background:#fff;border:1px solid #e4ebf4;border-radius:8px;padding:16px;min-height:104px}
.metric-label{color:#6d7f95;font-weight:700}
.metric-value{font-size:28px;font-weight:850;margin-top:10px;color:#102a4a}
.metric-foot{font-size:12px;color:#8a9bb0;margin-top:8px}
.dashboard-grid{display:grid;grid-template-columns:1fr;gap:14px}
.dash-panel{background:#fff;border:1px solid #e4ebf4;border-radius:8px;overflow:hidden}
.dash-panel-head{height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #edf1f7;font-weight:800}
.dash-panel-body{padding:14px 16px}
.work-list{display:grid;gap:10px}
.work-item{display:grid;grid-template-columns:120px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #f0f3f8}
.work-item:last-child{border-bottom:none}
.work-name{font-weight:750;color:#18314f}
.work-desc{color:#7f8fa6}
.quick-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px}
.quick-link{border:1px solid #e4ebf4;background:#fbfdff;border-radius:8px;padding:12px;color:#18314f;font-weight:750;cursor:pointer;text-align:left}
.quick-link:hover{border-color:#9dc5f8;color:#2f80ed;background:#f5f9ff}
@media(max-width:1100px){.metric-grid,.dashboard-grid{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:900px){.quick-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}}
@media(max-width:680px){.dashboard-head,.work-item{display:block}.dashboard-actions{margin-top:12px}.metric-grid,.quick-grid{grid-template-columns:1fr}.work-item>*{margin-bottom:6px}}
#apiLoading{position:fixed;inset:0;z-index:9998;display:none;align-items:center;justify-content:center;background:rgba(15,39,69,.18);pointer-events:none}
#apiLoading.show{display:flex}
.api-loading-card{display:flex;align-items:center;gap:12px;min-width:210px;padding:16px 18px;border:1px solid #dbe5f1;border-radius:8px;background:rgba(255,255,255,.96);box-shadow:0 18px 48px rgba(31,53,86,.22);color:#18314f}
.api-loading-spinner{width:28px;height:28px;border:3px solid #dbeafe;border-top-color:var(--blue);border-radius:50%;animation:api-loading-spin .8s linear infinite;flex:0 0 auto}
.api-loading-title{font-size:15px;font-weight:800;line-height:20px}
.api-loading-sub{font-size:12px;color:#6d7f95;line-height:18px}
@keyframes api-loading-spin{to{transform:rotate(360deg)}}
.approval-snapshot-modal{width:min(1180px,96vw)}
.approval-diff-summary{margin-bottom:14px;max-height:220px;overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fff}
.approval-diff-table{width:100%;border-collapse:collapse;font-size:12px}
.approval-diff-table th,.approval-diff-table td{border-bottom:1px solid var(--line);padding:8px 10px;text-align:left;vertical-align:top;word-break:break-all}
.approval-diff-table th{background:#f8fafd;color:#61738a}
.approval-snapshot-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.approval-snapshot-grid h3{margin:0 0 8px;font-size:14px;color:#18314f}
.approval-snapshot-grid pre{height:420px;overflow:auto;margin:0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#fbfcfe;white-space:pre-wrap;word-break:break-word;font-size:12px;line-height:1.5;color:#132d4d}
@media(max-width:900px){.approval-snapshot-grid{grid-template-columns:1fr}.approval-snapshot-grid pre{height:260px}}
.issue-stock-dropdown{position:fixed;z-index:9999;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 32px rgba(31,53,86,.18);overflow:hidden;color:var(--text)}
.issue-stock-dropdown-head,.issue-stock-option{display:grid;grid-template-columns:1.5fr 1.1fr 1.2fr 1fr 1fr .9fr .9fr;gap:8px;align-items:center}
.issue-stock-dropdown-head{height:34px;padding:0 12px;background:#f8fafd;color:#61738a;font-weight:800;border-bottom:1px solid var(--line)}
.issue-stock-dropdown-body{max-height:180px;overflow:auto}
.issue-stock-cell{display:flex;align-items:center;gap:6px;min-width:180px}
.issue-stock-cell .issue-stock-input{min-width:0;flex:1}
.issue-stock-cell .issue-stock-picker-btn{flex:0 0 auto;white-space:nowrap}
.issue-stock-picker-mask{position:fixed;inset:0;z-index:30;background:rgba(15,39,69,.38);display:flex;align-items:center;justify-content:center;padding:20px}
.issue-stock-picker{width:min(1040px,94vw);max-height:80vh;background:#fff;border-radius:10px;box-shadow:0 18px 60px rgba(0,0,0,.24);display:flex;flex-direction:column;overflow:hidden;font-size:13px}
.issue-stock-picker-head{min-height:62px;padding:12px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.issue-stock-picker-title{font-size:18px;font-weight:800;color:var(--text)}
.issue-stock-picker-sub{font-size:12px;color:#7c8fa6;margin-top:4px}
.issue-stock-picker-tools{display:grid;grid-template-columns:112px 112px minmax(190px,1fr) 136px 112px 68px 30px;align-items:center;gap:7px;padding:8px 12px;border-bottom:1px solid var(--line);background:#fbfdff}
.issue-picker-field{height:44px;border:1px solid #dbe5f1;border-radius:7px;background:#fff;display:flex;flex-direction:column;justify-content:center;padding:4px 8px}
.issue-picker-field span{font-size:11px;color:#6d7f95;font-weight:700;line-height:14px}
.issue-picker-field input{width:100%;height:22px;border:0;outline:none;padding:0;background:transparent;color:var(--text);font-size:13px}
.issue-picker-field:focus-within{border-color:#9dc5f8;box-shadow:0 0 0 3px rgba(47,128,237,.10)}
.issue-stock-picker-tools .btn.primary{height:44px;white-space:nowrap;padding:0 14px}
.issue-stock-picker-tools span{color:#61738a;font-weight:700;white-space:nowrap}
.issue-stock-picker-tools .close{font-size:20px;line-height:1;padding:0}
.issue-stock-picker-body{padding:0 12px;overflow:auto}
.issue-stock-picker-grid{min-width:1120px}
.issue-stock-picker-grid th:first-child,.issue-stock-picker-grid td:first-child{width:46px;text-align:center}
.issue-stock-picker-grid th,.issue-stock-picker-grid td{padding:8px 8px;font-size:13px}
.issue-stock-picker-grid th:nth-child(9),.issue-stock-picker-grid td:nth-child(9),
.issue-stock-picker-grid th:nth-child(10),.issue-stock-picker-grid td:nth-child(10){width:74px;text-align:center}
.issue-stock-picker-grid input[type="checkbox"]{width:auto}
.issue-stock-picker-empty{text-align:center;color:#7f8fa6;padding:28px 0!important}
.issue-stock-picker-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;background:#fbfcfe;border-top:1px solid var(--line)}
.issue-stock-picker-foot span{color:#61738a;font-weight:700}
.issue-stock-picker-actions{display:flex;justify-content:flex-end;gap:8px}
.issue-stock-option{width:100%;min-height:38px;border:0;border-bottom:1px solid #f0f3f8;background:#fff;padding:0 12px;text-align:left;cursor:pointer;color:var(--text);font:inherit}
.issue-stock-option:hover{background:#eef5ff;color:var(--blue)}
.issue-stock-option span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.issue-stock-empty{padding:14px 12px;color:var(--muted)}
@media(max-width:1120px){.issue-stock-picker-tools{grid-template-columns:112px 112px 220px 136px 112px 68px 30px;overflow-x:auto}.issue-stock-picker-tools>*{min-width:0}}
.doc-auth-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:8px;padding:2px 7px;border-radius:6px;background:#fff2f2;border:1px solid #ef5350;color:#d71920;font-size:12px;font-weight:800;line-height:18px;white-space:nowrap;vertical-align:middle}
.doc-auth-field{display:flex;align-items:center;gap:8px}
.doc-auth-field input{min-width:0;flex:1}
.doc-auth-id-allowed{color:#d71920!important;font-weight:800}
.doc-auth-legend{margin-top:10px;color:#6d7f95;font-size:12px;line-height:20px}
.doc-auth-legend::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#d71920;margin-right:6px;vertical-align:1px}
body.audit-preview-page .modal-foot{display:none!important}
body.audit-preview-page .quick-lookup{display:none!important}
.purchase-inbound-detail-grid th:nth-child(5),.purchase-inbound-detail-grid td:nth-child(5),
.purchase-inbound-detail-grid th:nth-child(7),.purchase-inbound-detail-grid td:nth-child(7){width:160px!important;min-width:160px!important;text-align:left}

@media print{
  @page{size:A4 landscape;margin:10mm}
  body{background:#fff;color:#000;font-size:12px}
  .page,.query,.list,.toolbar,.modal-foot,.close,.btn,.toast,#apiMessage{display:none!important}
  .quick-lookup{display:none!important}
  .mask,.mask.show{position:static!important;display:block!important;background:transparent!important;padding:0!important}
  .modal{width:100%!important;max-height:none!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
  .modal-head{border-bottom:1px solid #333!important;padding:0 0 8px!important;min-height:auto!important;text-align:center;justify-content:center!important}
  .modal-title{font-size:20px!important;color:#000!important}
  .modal-sub{font-size:11px!important;color:#333!important}
  .modal-body{padding:10px 0 0!important;overflow:visible!important}
  .form-grid{border:1px solid #333!important;border-radius:0!important}
  .col{padding:8px 12px!important}
  .row{min-height:30px!important;border-bottom:1px solid #ddd!important}
  .label{color:#000!important;font-weight:700}
  input,select,textarea{color:#000!important}
  .tabs2{display:none!important}
  .grid-wrap{overflow:visible!important}
  .grid{min-width:0!important;width:100%!important;font-size:11px}
  .grid th,.grid td{border:1px solid #333!important;padding:4px!important;white-space:normal!important;color:#000!important}
  .grid input,.grid select,.grid textarea{border:0!important;padding:0!important}
  .summary-bar{border-top:1px solid #333!important;color:#000!important}
}
.report-tabs{padding:0 20px}.report-query{grid-template-columns:1fr 1fr 1.6fr 1fr auto}.report-table{min-width:1180px}.report-table th,.report-table td{max-width:220px;overflow:hidden;text-overflow:ellipsis}.report-detail-table th{text-align:left;background:#f8fafd;color:#61738a}.report-detail-table td{white-space:normal;word-break:break-all}.report-summary{border-bottom:1px solid var(--line)}

.purchase-print-page{display:none}

@media print{
  @page purchase-order-print{size:A4 portrait;margin:13mm 11mm}
  body.purchase-order-page{background:#fff!important}
  body.purchase-order-page *{visibility:hidden!important}
  body.purchase-order-page .purchase-print-page,
  body.purchase-order-page .purchase-print-page *{visibility:visible!important}
  body.purchase-order-page .purchase-print-page{
    page:purchase-order-print;
    display:block!important;
    position:static;
    margin:0 auto;
    width:188mm;
    color:#222;
    font-family:"SimSun","Songti SC","Microsoft YaHei",serif;
    font-size:11pt;
    line-height:1.35;
  }
  .purchase-print-company{
    text-align:center;
    font-size:16pt;
    line-height:1.6;
  }
  .purchase-print-address{
    text-align:center;
    font-size:10.5pt;
    line-height:1.4;
  }
  .purchase-print-line{
    height:0;
    border-top:1px solid #222;
    margin:2mm 0 3mm;
  }
  .purchase-print-title{
    text-align:center;
    font-size:17pt;
    font-weight:700;
    line-height:1.5;
  }
  .purchase-print-meta,
  .purchase-print-sign,
  .purchase-print-info{
    display:grid;
    border-bottom:1px solid #222;
    min-height:9mm;
    align-items:end;
    column-gap:4mm;
    padding:0 1mm 1.5mm;
  }
  .purchase-print-meta{
    grid-template-columns:1fr 48mm;
    margin-top:1mm;
  }
  .purchase-print-sign{
    grid-template-columns:1fr 1fr 1fr;
    min-height:13mm;
    font-size:12pt;
  }
  .purchase-print-info{
    grid-template-columns:1fr 58mm;
  }
  .purchase-print-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    font-size:10.5pt;
  }
  .purchase-print-table th,
  .purchase-print-table td{
    border:1px solid #222;
    height:8.2mm;
    padding:1mm 1.4mm;
    text-align:center;
    vertical-align:middle;
    font-weight:400;
    word-break:break-all;
  }
  .purchase-print-table th:nth-child(1){width:22mm}
  .purchase-print-table th:nth-child(2){width:42mm}
  .purchase-print-table th:nth-child(3){width:19mm}
  .purchase-print-table th:nth-child(4){width:20mm}
  .purchase-print-table th:nth-child(5){width:34mm}
  .purchase-print-table th:nth-child(6){width:14mm}
  .purchase-print-table th:nth-child(7){width:14mm}
  .purchase-print-table th:nth-child(8){width:18mm}
  .purchase-print-table th:nth-child(5),
  .purchase-print-table td:nth-child(5){
    white-space:nowrap;
    word-break:normal;
  }
  .purchase-print-notes{
    display:grid;
    grid-template-columns:18mm 1fr;
    column-gap:2mm;
    margin-top:4mm;
    padding-left:5mm;
    font-size:11.5pt;
    line-height:2;
  }
  .purchase-print-note-label{
    text-align:right;
  }
}


/* =========================================================
   EbERP Dynamics 365 inspired refresh - 2026-07-09
   目标：安静、统一、表格为主、操作区清晰、右侧摘要可用
   ========================================================= */
:root{
  --nav:#294f7d;
  --nav2:#3f6593;
  --blue:#2f80ed;
  --text:#172b4d;
  --muted:#6b7b8f;
  --line:#dfe7ef;
  --bg:#f5f7f9;
  --card:#ffffff;
  --soft:#f8fafc;
  --green:#20a162;
  --shadow:0 1px 2px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.04);
}
body{background:var(--bg);color:var(--text);font-size:13px}
.login-page{background:linear-gradient(135deg,#294f7d,#3f6593)}
.login-card{border-radius:10px;box-shadow:0 18px 50px rgba(15,39,69,.20)}
.login-title{color:#294f7d;letter-spacing:.2px}.login-sub{color:#758195}
.login-card input{border-radius:4px;height:40px}.login-card input:focus{border-color:#9dc5f8;box-shadow:0 0 0 3px rgba(47,128,237,.10);outline:none}
.app{background:#f4f6f8}.side{width:224px;flex-basis:224px;background:#fff;color:#172b4d;border-right:1px solid var(--line);padding:14px 10px;box-shadow:none}.logo{height:42px;margin:0 6px 14px;display:flex;align-items:center;justify-content:flex-start;padding-left:12px;border-radius:6px;color:#294f7d;font-size:18px;letter-spacing:.3px}.logo:before{content:"";width:9px;height:24px;background:#2f80ed;border-radius:6px;margin-right:10px}.menu-title{height:36px;margin-top:4px;padding:0 10px;border-radius:4px;color:#4d5c6d;font-weight:700}.menu-title span:last-child{display:flex;align-items:center;gap:6px}.menu-title.active,.menu-title:hover{background:#edf5ff;color:#294f7d}.sub-wrap{max-height:320px}.sub{padding-left:34px;line-height:32px;border-radius:4px;color:#4f5f70;font-weight:500}.sub:hover,.sub.on{background:#eaf3ff;color:#294f7d;font-weight:700}.main{background:#f4f6f8}.top{height:50px;background:#fff;border-bottom:1px solid var(--line);padding:0 18px}.brand{font-size:15px;color:#172b4d}.pill{background:#edf5ff;color:#55708d;border-radius:999px;padding:3px 9px;font-size:12px}.tabs{height:38px;background:#fff;border-bottom:1px solid var(--line);padding:0 14px;align-items:center;gap:6px}.tab{height:30px;border:none;border-radius:4px;background:transparent;color:#57677a;padding:6px 10px;flex:0 1 142px}.tab:first-child{flex:0 0 66px}.tab.active{background:#edf5ff;color:#294f7d;font-weight:700}.tab-close{color:#92a0af}.work{padding:12px}.module-frame{border-radius:6px;box-shadow:var(--shadow);background:#fff}.page{border-radius:6px;box-shadow:none;border:1px solid var(--line);min-height:100%;display:flex;flex-direction:column}.toolbar{min-height:62px;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}.title{font-size:20px;font-weight:700;color:#172b4d}.hint{font-size:12px;color:#758195;margin-top:4px}.btn{height:34px;border-radius:4px;padding:0 12px;background:#fff;border:1px solid #cfd8e3;color:#243b53;font-weight:600}.btn:hover{background:#f6f8fa}.btn.primary{background:#2f80ed;border-color:#2f80ed;color:#fff}.btn.primary:hover{background:#1f6fd2}.btn.text{height:auto;border:none;background:transparent;color:#1f6fd2;padding:3px 6px}.btn.danger{border-color:#ffd6d6;color:#d14343;background:#fffafa}.query{padding:12px 16px;background:#fbfcfd;border-bottom:1px solid var(--line);grid-template-columns:minmax(240px,1.5fr) minmax(120px,.8fr) minmax(120px,.8fr) auto;gap:10px}.query input,.query select{height:34px;border-radius:4px;border:1px solid #cfd8e3;background:#fff;color:#172b4d}.query input:focus,.query select:focus{border-color:#9dc5f8;box-shadow:0 0 0 3px rgba(47,128,237,.10);outline:none}.list{padding:0;overflow:auto;flex:1}.table{font-size:13px}.table th{height:38px;background:#f7f9fb;color:#536579;border-bottom:1px solid var(--line);font-size:12px;text-transform:none;padding:0 12px}.table td{height:42px;border-bottom:1px solid #edf1f5;padding:0 12px;color:#23364d}.table tbody tr:hover{background:#f7fbff}.table tbody tr.row-active{background:#eaf3ff}.code{color:#62748a}.tag{border-radius:999px;border:1px solid #dce8f6;background:#f7fbff;color:#55708d;padding:2px 8px}.tag.ok{color:#20a162;background:#f0fbf6}.tag.warn{color:#a15c00;background:#fff7ed}.tag.danger{color:#c0392b;background:#fff1f1}.cards{padding:14px;gap:12px}.card{border-radius:6px;box-shadow:none;background:#fff}.num{font-size:22px}.modal{border-radius:8px}.modal-head{min-height:58px;background:#fff}.modal-title{font-size:17px}.form-grid{border-radius:6px}.row{grid-template-columns:110px 1fr;min-height:40px}.label{color:#62748a}.tabs2 button.on{color:#2f80ed;border-color:#2f80ed}.grid th{background:#f7f9fb;color:#536579}.total-bar,.modal-foot{background:#fbfcfd}.summary-bar{background:#fbfcfd;padding:12px 16px;margin:0;border-top:1px solid var(--line)}.doc-query .query-field{height:50px;border-radius:4px}.query.doc-query .btn.primary{height:50px}.detail-tools{padding:10px 0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* 主从布局：左表格 + 右侧 FactBox */
.split-workspace{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:0;min-height:0;flex:1}.split-workspace .list{border-right:1px solid var(--line)}.factbox{background:#fff;padding:14px 14px 18px;overflow:auto}.factbox-title{font-size:13px;font-weight:800;color:#172b4d;margin:2px 0 10px;display:flex;align-items:center;gap:8px}.factbox-title:before{content:"";width:4px;height:16px;border-radius:4px;background:#2f80ed}.fact-card{border:1px solid var(--line);border-radius:6px;background:#fff;margin-bottom:12px;overflow:hidden}.fact-card h4{margin:0;padding:10px 12px;border-bottom:1px solid var(--line);font-size:13px;background:#fbfcfd}.fact-row{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-bottom:1px solid #f0f3f6}.fact-row:last-child{border-bottom:none}.fact-label{color:#6b7b8f}.fact-value{font-weight:700;color:#172b4d;text-align:right}.fact-amount{font-size:20px;font-weight:800;color:#294f7d;line-height:1.2}.fact-empty{color:#7b8794;font-size:12px;line-height:1.7;background:#fbfcfd;border:1px dashed #ccd6e0;border-radius:6px;padding:12px}.actionbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.page-title-block{min-width:0}.advanced-link{color:#1f6fd2;font-weight:700;cursor:pointer;white-space:nowrap}.user-trigger{border:1px solid var(--line);background:#fff;border-radius:999px;padding:5px 10px;color:#172b4d}.user-meta{color:#6b7b8f}.user-dropdown{border:1px solid var(--line);box-shadow:var(--shadow);border-radius:6px}.user-dropdown button:hover{background:#edf5ff;color:#294f7d}
@media(max-width:1100px){.split-workspace{grid-template-columns:1fr}.factbox{display:none}.side{width:206px;flex-basis:206px}}
@media(max-width:900px){.top{padding:0 12px}.work{padding:8px}.query{grid-template-columns:1fr}.split-workspace{display:block}.factbox{display:block;border-top:1px solid var(--line)}}

/* =========================================================
   EbERP blue left sidebar + business/finance menu cleanup
   2026-07-09
   ========================================================= */
:root{
  --nav:#234f86;
  --nav2:#2f67a8;
  --nav3:#1e4678;
  --blue:#2f80ed;
}
.side{
  background:linear-gradient(180deg,#285b96 0%,#214b7f 52%,#1d416f 100%) !important;
  color:#fff !important;
  border-right:0 !important;
  box-shadow:4px 0 18px rgba(18,48,86,.16) !important;
}
.logo{
  color:#fff !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.12) !important;
}
.logo:before{
  background:#8cc3ff !important;
}
.menu-title{
  color:#eaf3ff !important;
  background:transparent !important;
  border-radius:6px !important;
}
.menu-title.active,.menu-title:hover{
  background:rgba(255,255,255,.13) !important;
  color:#fff !important;
}
.menu-arrow{
  color:#c9def6 !important;
}
.sub-wrap{max-height:360px !important;}
.sub{
  color:#d9e8f8 !important;
  border-radius:6px !important;
  padding-left:38px !important;
  margin:1px 2px !important;
}
.sub:hover,.sub.on{
  background:rgba(255,255,255,.16) !important;
  color:#fff !important;
  font-weight:800 !important;
}
.top,.tabs{box-shadow:0 1px 0 rgba(16,24,40,.03)}

.import-page{overflow:auto;display:block;min-height:100%;}
.import-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:14px 16px;background:#fbfcfd;border-bottom:1px solid var(--line)}
.step{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border:1px solid #dbe5f1;border-radius:8px;background:#fff;color:#64748b;font-weight:700}
.step b{display:inline-flex;width:22px;height:22px;border-radius:999px;align-items:center;justify-content:center;background:#edf5ff;color:#2f67a8;font-size:12px}.step.on{border-color:#9dc5f8;background:#f2f8ff;color:#234f86}.step.on b{background:#2f80ed;color:#fff}
.import-layout{display:grid;grid-template-columns:minmax(0,1fr) 292px;gap:0;border-bottom:1px solid var(--line)}.import-main{padding:16px}.import-side{border-left:1px solid var(--line);padding:16px;background:#fff}.import-section-title{font-size:14px;font-weight:900;color:#172b4d;margin:0 0 12px;display:flex;align-items:center;gap:8px}.import-section-title:before{content:"";width:4px;height:16px;border-radius:4px;background:#2f80ed}.import-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}.import-cards.compact{grid-template-columns:repeat(4,minmax(0,1fr))}.import-card{border:1px solid #dfe7ef;border-radius:8px;background:#fff;padding:14px;min-height:124px;cursor:pointer;transition:.16s}.import-card:hover,.import-card.active{border-color:#9dc5f8;box-shadow:0 8px 22px rgba(47,128,237,.08);transform:translateY(-1px)}.import-card-title{font-size:15px;font-weight:900;color:#172b4d;margin-bottom:8px}.import-card-desc{font-size:12px;line-height:1.7;color:#64748b}.import-card-foot{margin-top:10px;font-size:12px;color:#2f67a8;font-weight:800}.upload-box{border:1px dashed #9dc5f8;border-radius:10px;background:#f6fbff;padding:18px;display:flex;align-items:center;justify-content:space-between;gap:16px}.upload-title{font-size:16px;font-weight:900;color:#172b4d}.upload-desc{font-size:12px;color:#64748b;margin-top:6px;line-height:1.6}.import-tips{padding:8px 12px}.import-tips p{margin:8px 0;color:#64748b;line-height:1.55}.import-log{padding:16px}.import-log .table{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
@media(max-width:1180px){.import-layout{grid-template-columns:1fr}.import-side{border-left:0;border-top:1px solid var(--line)}.import-cards,.import-cards.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.import-steps{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.import-cards,.import-cards.compact,.import-steps{grid-template-columns:1fr}.upload-box{align-items:flex-start;flex-direction:column}}


/* =========================================================
   Final menu/customer cleanup 2026-07-09
   - 左侧保持整栏蓝色
   - 默认只显示一级菜单
   - 去掉客户右侧摘要后表格全宽
   ========================================================= */
.side{
  width:224px !important;
  flex:0 0 224px !important;
  background:linear-gradient(180deg,#285b96 0%,#214b7f 52%,#1d416f 100%) !important;
  color:#fff !important;
  border-right:0 !important;
  padding:14px 10px !important;
}
.logo{
  color:#fff !important;
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.12) !important;
}
.logo:before{background:#8cc3ff !important;}
.menu-title{
  color:#eaf3ff !important;
  background:transparent !important;
  border-radius:6px !important;
}
.menu-title.active,.menu-title:hover{
  background:rgba(255,255,255,.13) !important;
  color:#fff !important;
}
.menu-arrow{color:#c9def6 !important;}
.menu-group .sub-wrap{
  overflow:hidden !important;
  max-height:360px;
  transition:max-height .18s ease !important;
}
.menu-group.collapsed .sub-wrap{max-height:0 !important;}
.menu-group.collapsed .menu-arrow{transform:rotate(-90deg) !important;}
.sub{
  color:#d9e8f8 !important;
  border-radius:6px !important;
  padding-left:38px !important;
  margin:1px 2px !important;
}
.sub:hover,.sub.on{
  background:rgba(255,255,255,.16) !important;
  color:#fff !important;
  font-weight:800 !important;
}
.customer-table{min-width:1120px;}