:root{--blue:#28578b;--ink:#172d43;--muted:#66798b;--line:#dfe7ef;--pale:#edf3f9;--green:#20755a;--red:#b43f4d;--amber:#a36915}*{box-sizing:border-box}body{margin:0;font:14px -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;color:var(--ink);background:#f3f6fa}button,input,select{font:inherit;border:1px solid #ccd7e2;padding:10px 12px;border-radius:8px;color:var(--ink);background:white;min-height:42px}button{cursor:pointer;touch-action:manipulation}button:hover{background:var(--pale)}button:disabled{opacity:.5;cursor:default}button.primary,nav button.active{background:var(--blue);color:white;border-color:var(--blue)}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #dea83e;outline-offset:3px}[hidden]{display:none!important}header{background:white;position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:20px;padding:16px 30px;border-bottom:1px solid var(--line)}header img{width:145px}.brand{font-size:11px;letter-spacing:2px;flex:1;color:var(--muted)}header select{min-width:130px}nav{position:fixed;top:79px;bottom:0;width:185px;background:#fff;border-right:1px solid var(--line);padding:24px 12px;display:flex;flex-direction:column;gap:9px}nav button{text-align:left;border:0;padding:13px 14px}main{margin-left:185px;max-width:1800px;padding:32px}.intro{display:flex;justify-content:space-between;align-items:center;gap:16px}h1{font-size:32px;letter-spacing:-.8px;line-height:1.2;margin:9px 0}h2{font-size:18px;margin:0 0 15px}h3{font-size:15px}p{line-height:1.65}.muted,small{color:var(--muted)}small{line-height:1.55}.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.syncbar{display:flex;gap:12px;align-items:center;padding:13px 0;font-size:12px;color:var(--muted)}#message:not(:empty),#loginError:not(:empty){padding:12px;background:#fff3e1;border-left:3px solid #d8a04c;border-radius:4px;line-height:1.5}.filterpanel{border:1px solid var(--line);border-radius:12px;padding:16px 18px;background:white;margin:12px 0 16px}summary{font-weight:600;cursor:pointer}.filters{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}label{display:flex;flex-direction:column;gap:7px;min-width:145px;flex:1;font-size:12px;color:var(--muted)}label.wide{flex:1.5;min-width:190px}label input,label select{width:100%;min-width:0}.scope{font-size:12px;color:var(--blue);line-height:1.6;margin:0 0 17px}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.kpi,.panel{border:1px solid var(--line);border-radius:12px;background:white;padding:22px;min-width:0}.kpi:first-child{background:var(--blue);color:white;border-color:var(--blue)}.kpi:first-child small{color:#dce7f6}.kpi b{display:block;font-size:29px;line-height:1.25;margin:12px 0;letter-spacing:-.5px;overflow-wrap:anywhere}.panel{margin-bottom:18px}.visuals{display:grid;grid-template-columns:1.6fr 1fr;gap:18px}.chart{height:285px}.insight{border-top:1px solid var(--line);padding:13px 0;display:flex;gap:12px;justify-content:space-between}.insight strong{display:block}.insight p{font-size:12px;margin:4px 0;color:var(--muted)}.pos{color:var(--green)}.neg{color:var(--red)}.warn{color:var(--amber)}.tag{display:inline-block;background:var(--pale);color:var(--blue);font-size:11px;border-radius:5px;padding:4px 7px;white-space:normal}.panelhead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.panelhead h2{margin-bottom:0}.tableWrap{overflow:auto;margin-top:18px}table{border-collapse:collapse;width:100%;font-size:13px}th,td{border-bottom:1px solid var(--line);padding:14px 10px;text-align:right;white-space:nowrap}th{font-size:11px;color:var(--muted)}th button{border:0;min-height:35px;font-size:11px;padding:0;background:none}td:first-child,th:first-child{text-align:left}td:first-child{white-space:normal;min-width:230px;max-width:370px}tbody tr:hover{background:#f6f9fc}.productcell{display:flex;gap:12px;align-items:center;text-align:left;max-width:360px}.productcell img,.imagePlaceholder{width:48px;height:48px;object-fit:contain;background:white;border-radius:7px;border:1px solid var(--line);flex-shrink:0}.imagePlaceholder{display:grid;place-items:center;color:#98a8b8;font-size:21px}.link{border:0;min-height:0;padding:0;background:none;color:var(--blue);text-align:left;line-height:1.45}.productcell small{display:block;font-size:11px;margin-top:3px}.pager{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted);gap:15px;margin-top:15px}.pager button{margin-left:6px;min-width:42px}.quickcards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.quickcards button{text-align:left;padding:16px;white-space:normal;border:1px solid var(--line)}.quickcards button.active{border:2px solid var(--blue);background:var(--pale)}.quickcards strong,.quickcards small{display:block}.quickcards b{font-size:23px;display:block;margin:10px 0}.methodology{font-size:13px}.methodology p{max-width:1050px}footer{color:var(--muted);font-size:11px;line-height:1.6;margin:22px 0}.login{margin:7vh auto;padding:35px;max-width:470px;background:white;border:1px solid var(--line);border-radius:16px}.login h1{font-size:29px}.login label{margin:18px 0}.login button{width:100%}.login p{color:var(--muted)}dialog{border:1px solid var(--line);border-radius:16px;width:min(1050px,94vw);max-height:90vh;padding:24px;color:var(--ink)}dialog::backdrop{background:#14293ecc;backdrop-filter:blur(3px)}.dialoghead{display:flex;justify-content:space-between;gap:20px;align-items:center;position:sticky;top:-24px;background:white;padding:8px 0 16px;z-index:2}.dialoghead h2{margin:0}.dialoghead button{font-size:25px;min-width:42px}.detailHero{display:flex;align-items:center;gap:24px;margin:15px 0}.detailHero img{width:145px;height:145px;object-fit:contain}.detailHero dl{display:grid;grid-template-columns:auto 1fr;gap:8px 20px}dt{color:var(--muted)}dd{margin:0}.detailActions{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.qualitygrid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.qualitygrid article{background:#f5f8fb;padding:20px;border-radius:10px}.mobileSort{display:none}
@media(max-width:1100px){nav{width:150px}main{margin-left:150px;padding:24px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.visuals{grid-template-columns:1fr}.quickcards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){header{padding:12px 16px;gap:12px}header img{width:115px}.brand{display:none}header select{margin-left:auto;min-width:116px;font-size:14px}#logout{font-size:11px;padding:7px}nav{position:static;width:100%;display:grid;grid-template-columns:repeat(3,1fr);padding:12px;gap:5px;border-right:0;border-bottom:1px solid var(--line)}nav button{text-align:center;font-size:12px;padding:10px 5px;min-height:44px}main{margin-left:0;padding:22px 14px}h1{font-size:27px}.intro{display:block}.intro>.actions{margin-top:15px}.syncbar{font-size:11px;flex-wrap:wrap}.filters{display:grid;grid-template-columns:1fr 1fr}.filters label{min-width:0;font-size:11px}.filters label.wide{grid-column:1/-1;min-width:0}.filters input,.filters select{font-size:16px}.filters button{grid-column:1/-1}button{min-height:44px}.kpis{gap:10px}.kpi{padding:15px 12px}.kpi b{font-size:23px}.kpi small{font-size:11px}.kpi:first-child{grid-column:1/-1}.kpi:first-child b{font-size:32px}.kpi:last-child{grid-column:1/-1}.panel{padding:17px 12px}.panelhead{align-items:stretch}.panelhead .actions{width:100%}.panelhead select{flex:1;max-width:100%;min-width:0;font-size:14px}.quickcards{gap:8px}.quickcards button{padding:12px}.quickcards strong{font-size:12px}.quickcards b{font-size:21px;overflow-wrap:anywhere}.quickcards small{font-size:11px}.chart{height:240px}.tableWrap{overflow:visible}table,tbody{display:block;width:100%}thead{display:none}tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:12px;border:1px solid var(--line);border-radius:9px;margin:12px 0;padding:14px}td{display:block;min-width:0!important;max-width:none!important;white-space:normal;text-align:left;border:0;padding:0;overflow-wrap:anywhere;font-size:14px}td:first-child{grid-column:1/-1}.productcell{max-width:100%}td:not(:first-child)::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:5px}.mobileSort{display:flex;margin-top:14px}.mobileSort select{font-size:16px}.qualitygrid{grid-template-columns:1fr}.detailHero{align-items:start;gap:12px}.detailHero img{width:90px;height:90px}.detailHero dl{font-size:12px;grid-template-columns:1fr;gap:4px}.login{margin:30px 14px;padding:25px}dialog{padding:16px}.dialoghead{top:-16px}.detailHero dd{margin-bottom:6px}.pager{font-size:11px}.insight{gap:8px}.insight strong{font-size:13px;overflow-wrap:anywhere}.insight>div:last-child{flex-shrink:0}}
@media(max-width:360px){.quickcards{grid-template-columns:1fr}header img{width:90px}header{gap:8px}#logout{padding:6px}header select{min-width:105px}}
#customerNotes{font-size:.9rem;line-height:1.65;color:#526479}#customerMode,#peerCohort{max-width:100%;min-height:44px}body:has([data-view="customerPlan"].active) #tablePanel td:last-child{min-width:220px;max-width:350px;white-space:normal} @media(max-width:720px){body:has([data-view="customerPlan"].active) #tablePanel td:last-child{grid-column:1/-1;min-width:0;max-width:none}#customerNotes{font-size:.82rem}}
.orderGrid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.orderGrid>section{min-width:0}.orderKpis{grid-template-columns:repeat(3,minmax(0,1fr))}.orderDay{margin:0;background:#f7faff}.orderDay>b{font-size:25px}.orderDay dl{display:grid;grid-template-columns:1fr auto;gap:10px}.orderDay dd{font-weight:600}.orderWeekRange{display:block;font-size:11px}.orderMethod{margin-top:20px;font-size:12px}.orderGrid td:first-child{min-width:120px}#ordersPanel .panelhead label{flex:0 1 230px}#ordersPanel>.scope{margin-top:18px}@media(max-width:1100px){.orderGrid{grid-template-columns:1fr}}@media(max-width:720px){.orderKpis{grid-template-columns:1fr}.orderDay dl{grid-template-columns:1fr}.orderDay dd{margin-bottom:8px}#ordersPanel .panelhead label{flex:1 1 100%}.orderGrid{gap:12px}#ordersPanel h2{font-size:20px}.orderGrid th,.orderGrid td{white-space:normal}}

.monthCompareValue{display:block;color:#5c6c7a;font-size:11px;white-space:nowrap;margin-top:4px}

.tag.planExpedite,.tag.planDataIssue{background:#ffebeb;color:#a42c37}.tag.planOrderNow,.tag.planSoon,.tag.planMissingLead{background:#fff1d7;color:#885400}.tag.planCovered{background:#e3f3ec;color:#246346}

/* Keep row identity visible while wide tables scroll; mobile retains stacked cards. */
@media(min-width:721px){
 .tableWrap{isolation:isolate;max-height:70vh;max-height:70dvh;overscroll-behavior:contain}
 .tableWrap thead th{position:sticky;top:0;z-index:2;background:#fff;box-shadow:0 4px 6px -5px #172d4366}
 .tableWrap table{border-collapse:separate;border-spacing:0}
 .tableWrap th:first-child,.tableWrap td:first-child{position:sticky;left:0;z-index:1;background:#fff;border-right:1px solid var(--line);box-shadow:5px 0 8px -6px #172d4366}
 .tableWrap thead th:first-child{z-index:3;box-shadow:5px 0 8px -6px #172d4366,0 4px 6px -5px #172d4366}
 .tableWrap tbody tr:hover td:first-child{background:#f6f9fc}
 #tableWrap.productTable th:first-child,#tableWrap.productTable td:first-child{width:280px;min-width:280px;max-width:280px}
 #tableWrap.productTable .productcell{width:260px}
 .tableWrap:focus-visible{outline:3px solid #dea83e;outline-offset:3px}
}
.productcell>div{min-width:0;overflow-wrap:anywhere}
.productcell small{color:var(--ink);font-weight:600}
.deliveryStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0}.deliveryStats>div{padding:12px;border:1px solid var(--line);border-radius:8px}.deliveryStats strong{display:block;margin-top:8px;font-size:17px}.tag.deliveryReview,.tag.deliveryOverdue,.tag.deliveryNoDate{background:#fff1d7;color:#885400}.tag.deliveryReady{background:#e3f3ec;color:#246346}nav{overflow-y:auto}@media(max-width:900px){.deliveryStats{grid-template-columns:repeat(2,minmax(0,1fr))}}
