/* Purchase Planner history input preview */
.ppx{max-width:1500px;margin:0 auto;padding:30px 32px 80px;color:#17202a}
.ppx *{box-sizing:border-box}.ppx-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:24px}.ppx-kicker{font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#8a919b}.ppx h1{font-size:32px;letter-spacing:-.04em;margin:5px 0 6px}.ppx-sub{color:#6d7580;font-size:14px}.ppx-chip{padding:9px 13px;border:1px solid #e2e5e9;border-radius:999px;background:#fff;font-size:12px;font-weight:700;color:#59616b}
.ppx-hero{background:linear-gradient(145deg,#fff,#f8f9fb);border:1px solid #e4e7eb;border-radius:22px;padding:24px;box-shadow:0 12px 35px rgba(18,24,32,.045);margin-bottom:18px}.ppx-hero-top{display:flex;justify-content:space-between;gap:20px;align-items:center}.ppx-hero h2{font-size:20px;margin:0 0 5px;letter-spacing:-.02em}.ppx-hero p{margin:0;color:#737b85;font-size:13px}.ppx-progress{display:flex;gap:7px}.ppx-progress i{width:30px;height:6px;border-radius:99px;background:#e6e9ed}.ppx-progress i.on{background:#1f2937}
.ppx-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px}.ppx-card{background:#fff;border:1px solid #e3e6ea;border-radius:18px;overflow:hidden;box-shadow:0 8px 28px rgba(18,24,32,.035)}.ppx-card-head{padding:19px 20px 15px;border-bottom:1px solid #eef0f2}.ppx-card-head span{display:block;font-size:11px;color:#8a919b;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}.ppx-card-head h3{margin:0;font-size:17px}.ppx-card-head p{margin:5px 0 0;color:#7a828c;font-size:12px}.ppx-body{padding:20px}.ppx-period{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}.ppx-field span{display:block;font-size:11px;font-weight:700;color:#6e7681;margin-bottom:6px}.ppx-field input{width:100%;height:40px;border:1px solid #dfe3e8;border-radius:10px;padding:0 11px;background:#fff}
.ppx-drop{min-height:180px;border:1.5px dashed #cfd5dc;border-radius:14px;background:#fafbfc;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;transition:.15s}.ppx-drop.drag{border-color:#6b7280;background:#f4f5f7}.ppx-drop-icon{width:42px;height:42px;border-radius:13px;background:#fff;border:1px solid #e0e4e8;display:grid;place-items:center;font-size:20px;margin-bottom:10px}.ppx-drop strong{font-size:14px}.ppx-drop small{color:#858c95;margin-top:5px}.ppx-btn{border:1px solid #d9dde2;background:#fff;border-radius:9px;padding:8px 12px;font-size:12px;font-weight:750;margin-top:12px}.ppx-btn.primary{background:#17191c;color:#fff;border-color:#17191c}.ppx-map{display:flex;gap:8px;margin-top:12px}.ppx-map span{background:#f3f5f7;border-radius:8px;padding:7px 9px;font-size:11px;color:#626a74}.ppx-map b{color:#1d232b}
.ppx-paste{width:100%;height:180px;resize:vertical;border:1px solid #dfe3e8;border-radius:12px;padding:13px;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;line-height:1.6}.ppx-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.ppx-status{font-size:11px;color:#7b838d}.ppx-wide{grid-column:1/-1}.ppx-history-head{display:flex;align-items:center;justify-content:space-between;padding:20px}.ppx-history-head h3{margin:0;font-size:17px}.ppx-history-head small{color:#818994}.ppx-periods{padding:0 20px 20px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ppx-month{border:1px solid #e3e6ea;border-radius:13px;padding:13px;background:#fff;min-height:92px}.ppx-month.empty{border-style:dashed;background:#fafbfc;color:#9299a2}.ppx-month strong{display:block;font-size:13px}.ppx-month span{display:block;color:#7c848e;font-size:11px;margin-top:5px}.ppx-month b{display:block;font-size:20px;margin-top:9px;letter-spacing:-.03em}.ppx-footnote{margin-top:12px;padding:12px 14px;border-radius:11px;background:#f6f7f9;color:#707883;font-size:11px;line-height:1.5}
@media(max-width:900px){.ppx{padding:22px 16px 60px}.ppx-grid{grid-template-columns:1fr}.ppx-periods{grid-template-columns:repeat(2,1fr)}.ppx-head{align-items:flex-start;flex-direction:column}}

.ppx-month{position:relative}.ppx-delete{position:absolute;right:9px;top:7px;border:0;background:transparent;color:#8b929b;font-size:18px;line-height:1;cursor:pointer;border-radius:8px;padding:2px 7px}.ppx-delete:hover{background:#f1f3f5;color:#1f2937}
.ppx-analysis-note{margin:5px 0 0;color:#7a828c;font-size:12px;max-width:760px}.ppx-analysis-scroll{overflow:auto;border-top:1px solid #eef0f2}.ppx-analysis-table{width:100%;border-collapse:collapse;font-size:12px}.ppx-analysis-table th{position:sticky;top:0;background:#fafbfc;text-align:left;padding:11px 20px;color:#747c86;font-size:10px;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid #e9ecef}.ppx-analysis-table td{padding:11px 20px;border-bottom:1px solid #f0f2f4;color:#4f5863}.ppx-analysis-table td:nth-child(2){font-weight:800;color:#17202a}.ppx-tag{display:inline-block;padding:4px 7px;border-radius:999px;background:#f2f4f6;color:#505862;font-weight:700;font-size:10px}.ppx-empty-row{text-align:center!important;padding:30px!important;color:#9299a2!important}

.ppx-setup{background:#fff;border:1px solid #e3e6ea;border-radius:22px;padding:22px 24px;margin-bottom:18px;box-shadow:0 8px 28px rgba(18,24,32,.035)}.ppx-setup-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.ppx-setup-head h2{margin:4px 0 4px;font-size:20px;letter-spacing:-.025em}.ppx-setup-head p{margin:0;color:#7a828c;font-size:12px}.ppx-auto-pill{font-size:10px;font-weight:800;padding:7px 10px;border-radius:999px;background:#f1f3f5;color:#59616b}.ppx-setup-fields{display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:12px;margin-top:18px}.ppx-field select{width:100%;height:40px;border:1px solid #dfe3e8;border-radius:10px;padding:0 11px;background:#fff}.ppx-field small{display:block;margin-top:6px;color:#9097a0;font-size:10px;line-height:1.35}.ppx-setup-summary{margin-top:15px;padding:12px 14px;background:#f7f8fa;border-radius:11px;color:#5f6873;font-size:12px}.ppx-guidance{display:flex;gap:9px;align-items:center;margin-top:10px;font-size:11px;color:#78808a}.ppx-guidance b{color:#333b45;white-space:nowrap}@media(max-width:900px){.ppx-setup-fields{grid-template-columns:1fr}.ppx-guidance{align-items:flex-start;flex-direction:column}}

.ppx-snapshot-actions{display:flex;align-items:center;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid #edf0f2}.ppx-snapshot-actions span{font-size:11px;color:#858d97}.ppx-snapshot-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:11px 13px;border-radius:11px;background:#f4f6f8;color:#525b66;font-size:11px}.ppx-saved-plans{display:grid;gap:8px;padding:16px 20px}.ppx-saved-plan{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;border:1px solid #e7eaee;background:#fff;border-radius:12px;padding:12px 14px;text-align:left;cursor:pointer}.ppx-saved-plan:hover{background:#fafbfc;border-color:#d9dee4}.ppx-saved-plan span{display:flex;flex-direction:column;gap:3px}.ppx-saved-plan b{font-size:12px;color:#252c35}.ppx-saved-plan small{font-size:10px;color:#9097a0}.ppx-saved-plan strong{font-size:10px;color:#6c7580}.ppx-empty-saved{padding:12px;color:#9198a1;font-size:11px}

.ppx-recommendation-tools{display:flex;align-items:center;gap:9px;padding:12px 20px;border-bottom:1px solid #edf0f2}.ppx-recommendation-tools input,.ppx-recommendation-tools select{height:36px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;padding:0 11px;font-size:11px}.ppx-recommendation-tools input{width:220px}.ppx-recommendation-tools span{margin-left:auto;color:#7f8791;font-size:10px}.ppx-pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:13px 20px;border-top:1px solid #edf0f2}.ppx-pagination span{min-width:90px;text-align:center;color:#6f7781;font-size:10px}.ppx-pagination button:disabled{opacity:.4;cursor:default}@media(max-width:700px){.ppx-recommendation-tools{align-items:stretch;flex-direction:column}.ppx-recommendation-tools input{width:100%}.ppx-recommendation-tools span{margin-left:0}}

/* Purchase Planner decision UI v2 */
.ppx-demand-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 20px 20px}.ppx-demand-box{position:relative;border:1px solid #e5e7eb;border-radius:16px;padding:18px;background:#fbfcfd}.ppx-demand-box h4{margin:0 0 5px;font-size:15px}.ppx-demand-box p{margin:0 0 12px;color:#7b838d;font-size:12px;line-height:1.45;max-width:620px}.ppx-demand-badge{position:absolute;right:16px;top:15px;padding:5px 8px;border-radius:999px;background:#eef1f4;font-size:10px;font-weight:800;color:#59616b}.ppx-mini-paste{width:100%;height:92px;resize:vertical;border:1px solid #dfe3e8;border-radius:11px;padding:11px;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;background:#fff}.ppx-demand-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.ppx-demand-actions small{color:#858c95}.ppx-demand-reason{margin-top:8px}.ppx-demand-reason label{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;color:#6e7681}.ppx-demand-reason select{height:32px;border:1px solid #dfe3e8;border-radius:9px;background:#fff;padding:0 9px}
.ppx-recommendation-card{overflow:visible}.ppx-recommendation-card .ppx-recommendation-tools{position:sticky;top:52px;z-index:12;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-top:1px solid #eef0f2;border-bottom:1px solid #e6e9ed;box-shadow:0 7px 16px rgba(18,24,32,.035)}.ppx-recommendation-card .ppx-analysis-scroll{overflow:visible}.ppx-recommendation-card .ppx-analysis-table thead th{position:sticky;top:105px;z-index:11;background:#f8f9fa;box-shadow:inset 0 -1px #e6e9ed}.ppx-recommendation-card .ppx-analysis-table th,.ppx-recommendation-card .ppx-analysis-table td{padding-top:11px;padding-bottom:11px;vertical-align:middle}.ppx-product-name{min-width:210px;max-width:320px;color:#59616b}.ppx-reason{display:block;margin-top:3px;color:#8a919b;font-size:9px}.ppx-dead-btn{margin-left:auto;border:1px solid #e3d9d9;background:#fffafa;border-radius:9px;padding:8px 10px;font-size:11px;font-weight:750;color:#795c5c}.ppx-dead-btn b{margin-left:5px;padding:2px 6px;border-radius:999px;background:#f1e7e7}.ppx-dead-dialog{width:min(1120px,92vw);max-height:80vh;border:0;border-radius:20px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.22)}.ppx-dead-dialog::backdrop{background:rgba(18,24,32,.28);backdrop-filter:blur(3px)}.ppx-dead-head{display:flex;justify-content:space-between;gap:20px;padding:22px;border-bottom:1px solid #eceef1}.ppx-dead-head h3{margin:3px 0 5px}.ppx-dead-head p{margin:0;color:#747c86;font-size:12px}.ppx-dead-head button{border:0;background:#f1f3f5;width:32px;height:32px;border-radius:50%;font-size:20px}.ppx-dead-dialog .ppx-analysis-scroll{max-height:60vh;overflow:auto}.ppx-dead-dialog thead th{position:sticky;top:0;background:#f8f9fa;z-index:2}
@media(max-width:900px){.ppx-demand-grid{grid-template-columns:1fr}.ppx-recommendation-card .ppx-recommendation-tools{top:48px}.ppx-recommendation-card .ppx-analysis-table thead th{top:101px}}

.ppx-finalize-actions span{max-width:760px;line-height:1.45}.ppx-finalize-actions span b{color:#26313d}.ppx-finalize-actions .ppx-btn{white-space:nowrap}

.ppx-plan-actions{display:flex;gap:8px;align-items:center}.ppx-clear-btn{background:#fff!important;color:#7a3f3f!important;border:1px solid #eadede!important}.ppx-clear-btn:hover{background:#fff8f8!important}

/* Lost-demand evidence preview */
.ppx-demand-inputs .ppx-demand-box{margin-top:14px}.ppx-lost-demand-box{padding-bottom:12px}.ppx-sku-only-paste{min-height:82px}.ppx-lost-grid-wrap{margin-top:14px;border:1px solid #e8eaed;border-radius:12px}.ppx-lost-grid{min-width:980px}.ppx-cell{width:100%;min-width:92px;border:1px solid transparent;background:transparent;border-radius:6px;padding:7px 8px;font:inherit;color:inherit}.ppx-cell:hover{border-color:#dfe3e8;background:#fff}.ppx-cell:focus{outline:none;border-color:#aab6c4;background:#fff;box-shadow:0 0 0 2px rgba(70,100,130,.08)}.ppx-lost-grid td:nth-child(2){min-width:190px}.ppx-lost-grid td:nth-child(5){min-width:190px}

.ppx-interpretation{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#f1f3f5;font-size:11px;font-weight:650;white-space:nowrap}.ppx-interpretation.possible-dead{background:#f5eeee}.ppx-interpretation.growing{background:#edf5ef}.ppx-interpretation.possible-stockout{background:#f7f3e8}.ppx-interpretation.insufficient-data{background:#f2f2f2;color:#777}

/* Planner compact full-width tables */
.ppx-demand-inputs .ppx-demand-grid{padding-left:0;padding-right:0}.ppx-lost-demand-box{padding-left:8px!important;padding-right:8px!important}.ppx-lost-grid-wrap{overflow-x:hidden!important}.ppx-lost-grid{width:100%;table-layout:fixed}.ppx-lost-grid th,.ppx-lost-grid td{padding-left:8px!important;padding-right:8px!important}.ppx-lost-grid th:nth-child(1){width:9%}.ppx-lost-grid th:nth-child(2){width:9%}.ppx-lost-grid th:nth-child(3){width:13%}.ppx-lost-grid th:nth-child(4){width:18%}.ppx-name-compact{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ppx-recommendation-card .ppx-analysis-table{table-layout:fixed;width:100%}.ppx-recommendation-card .ppx-analysis-table th,.ppx-recommendation-card .ppx-analysis-table td{padding:9px 8px!important;font-size:10px}.ppx-recommendation-card .ppx-analysis-table th:nth-child(1){width:8%}.ppx-recommendation-card .ppx-analysis-table th:nth-child(2){width:22%}.ppx-recommendation-card .ppx-product-name{min-width:0;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ppx-recommendation-card .ppx-analysis-scroll{width:100%}

/* Purchase Planner full-width density pass */
.ppx{max-width:none!important;width:100%!important;margin:0!important;padding-left:12px!important;padding-right:12px!important}
.ppx-grid{gap:12px!important}
.ppx-card,.ppx-setup,.ppx-hero{border-radius:14px!important}
.ppx-history-head{padding-left:14px!important;padding-right:14px!important}
.ppx-analysis-table{table-layout:fixed;width:100%}
.ppx-analysis-table th,.ppx-analysis-table td{padding-left:10px!important;padding-right:10px!important}
.ppx-name-compact{max-width:100%!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ppx-lost-grid{min-width:0!important;width:100%!important;table-layout:fixed}
.ppx-lost-grid th:nth-child(1){width:8%!important}
.ppx-lost-grid th:nth-child(2){width:8%!important}
.ppx-lost-grid th:nth-child(3){width:14%!important}
.ppx-lost-grid th:nth-child(4){width:16%!important}
.ppx-lost-grid th:nth-child(5){width:10%!important}
.ppx-lost-grid th:nth-child(6){width:9%!important}
.ppx-lost-grid th:nth-child(7){width:13%!important}
.ppx-lost-grid th:nth-child(8){width:10%!important}
.ppx-lost-grid th:nth-child(9){width:12%!important}
.ppx-lost-grid td:nth-child(2),.ppx-lost-grid td:nth-child(5){min-width:0!important}
.ppx-lost-grid .ppx-cell{min-width:0!important;padding:6px 4px!important}
.ppx-recommendation-card .ppx-analysis-table{table-layout:fixed!important}
.ppx-recommendation-card .ppx-analysis-table th,.ppx-recommendation-card .ppx-analysis-table td{padding:9px 7px!important;font-size:11px!important;vertical-align:middle}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(1){width:8%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(2){width:21%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(3){width:8%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(4){width:7%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(5){width:7%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(6){width:7%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(7){width:7%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(8){width:13%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(9){width:8%!important}
.ppx-recommendation-card .ppx-analysis-table th:nth-child(10){width:7%!important}
.ppx-recommendation-card .ppx-product-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Purchase Planner full-width review + section navigation */
.ppx{max-width:none;width:100%;margin:0;padding-left:12px;padding-right:12px}
.ppx-jump-section{scroll-margin-top:72px}
.ppx-floating-head{position:sticky;top:0;z-index:18;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid #eef0f2}
.ppx-floating-subhead{position:sticky;top:0;z-index:18;background:rgba(250,251,252,.97);backdrop-filter:blur(14px);margin:-18px -18px 10px;padding:16px 18px 10px;border-bottom:1px solid #eef0f2}
.ppx-floating-subhead h4{margin:0}
.ppx-demand-box{overflow:visible}
.ppx-analysis-scroll{max-width:100%}
.ppx-lost-grid{width:100%;table-layout:fixed}
.ppx-lost-grid th:nth-child(1),.ppx-lost-grid td:nth-child(1){width:8%}
.ppx-lost-grid th:nth-child(2),.ppx-lost-grid td:nth-child(2){width:8%}
.ppx-lost-grid th:nth-child(3),.ppx-lost-grid td:nth-child(3){width:13%}
.ppx-lost-grid th:nth-child(4),.ppx-lost-grid td:nth-child(4){width:16%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ppx-lost-grid th:nth-child(5),.ppx-lost-grid td:nth-child(5){width:10%}
.ppx-lost-grid th:nth-child(6),.ppx-lost-grid td:nth-child(6){width:9%}
.ppx-lost-grid th:nth-child(7),.ppx-lost-grid td:nth-child(7){width:14%}
.ppx-lost-grid th:nth-child(8),.ppx-lost-grid td:nth-child(8),.ppx-lost-grid th:nth-child(9),.ppx-lost-grid td:nth-child(9){width:8%}
.ppx-recommendation-card .ppx-analysis-table{table-layout:fixed;width:100%}
.ppx-recommendation-card .ppx-analysis-table th,.ppx-recommendation-card .ppx-analysis-table td{padding-left:10px;padding-right:10px}
.ppx-recommendation-card .ppx-analysis-table td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}


/* Purchase Planner section-nav stabilization v22 */
#purchase-planning-page{--ppx-sticky-top:8px}
.ppx-jump-section{scroll-margin-top:var(--ppx-sticky-top)}
.ppx-floating-head,
.ppx-floating-subhead{
  position:sticky!important;
  top:var(--ppx-sticky-top)!important;
  z-index:30!important;
  isolation:isolate;
  box-shadow:0 1px 0 rgba(18,24,32,.06);
}
.ppx-floating-head{background:rgba(255,255,255,.97)!important}
.ppx-floating-subhead{background:rgba(250,251,252,.98)!important}
.ppx-card.ppx-jump-section,
.ppx-demand-inputs,
.ppx-demand-box.ppx-jump-section{overflow:visible!important}
.ppx-recommendation-card .ppx-recommendation-tools{position:static!important;top:auto!important;z-index:auto!important;box-shadow:none!important}
.ppx-recommendation-card .ppx-analysis-table thead th{position:static!important;top:auto!important}
.ppx-name-compact,.ppx-product-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}




/* Purchase Planner clean full-canvas sizing v26 */
.app-main:has(> #purchase-planning-page.route-active){
  box-sizing:border-box!important;
  width:calc(100vw - var(--sidebar-collapsed))!important;
  max-width:none!important;
  padding-right:0!important;
  overflow-x:hidden!important;
}
#purchase-planning-page.route-active{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  overflow-x:hidden!important;
}
#purchase-planning-page.route-active > .ppx{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding-left:12px!important;
  padding-right:0!important;
}
#purchase-planning-page.route-active .ppx-grid,
#purchase-planning-page.route-active .ppx-wide,
#purchase-planning-page.route-active .ppx-demand-inputs,
#purchase-planning-page.route-active .ppx-demand-box,
#purchase-planning-page.route-active .ppx-recommendation-card,
#purchase-planning-page.route-active .ppx-analysis-scroll{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
}

/* Purchase Planner collapsible planning layers v28 */
#purchase-planning-page [data-ppx-collapsible].is-collapsed > :not(.ppx-floating-subhead):not(.ppx-floating-head){display:none!important}
.ppx-collapse-toggle{margin-left:auto;width:30px;height:30px;border:1px solid #e3e6ea;border-radius:9px;background:#fff;color:#313943;font:600 18px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;flex:0 0 auto}
.ppx-collapse-toggle:hover{background:#f5f6f7}
.ppx-floating-subhead{display:flex;align-items:center;gap:9px}
.ppx-floating-subhead h4{margin-right:auto}
.ppx-history-head.ppx-floating-head>.ppx-collapse-toggle{align-self:center}

/* Purchase Planner review polish v29 */
body[data-active-tab="purchase-planning"] .app-main{padding-right:18px!important}
#purchase-planning-page:not([hidden])>.ppx{padding-right:10px!important}
#purchase-planning-page .ppx-floating-head,
#purchase-planning-page .ppx-floating-subhead{position:sticky!important;top:8px!important;z-index:40!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
#purchase-planning-page .ppx-floating-head{background:rgba(255,255,255,.96)!important}
#purchase-planning-page .ppx-floating-subhead{background:rgba(250,251,252,.96)!important}
.ppx-reco-qty{width:92px;box-sizing:border-box;border:1px solid transparent;border-radius:7px;background:transparent;padding:6px 7px;font:600 12px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-align:right}
.ppx-reco-qty:hover{border-color:#dfe3e8;background:#fff}
.ppx-reco-qty:focus{outline:2px solid rgba(0,113,227,.18);border-color:#8abcf0;background:#fff}

/* Sticky section headers v30 — remove every clipping ancestor in planner flow */
#purchase-planning-page,
#purchase-planning-page>.ppx,
#purchase-planning-page .ppx-grid,
#purchase-planning-page #ppxDemandAnalysisSection,
#purchase-planning-page .ppx-demand-inputs,
#purchase-planning-page #ppxResellerSection,
#purchase-planning-page #ppxLostDemandSection,
#purchase-planning-page #ppxRecommendationSection{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
}
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:8px!important;
  z-index:70!important;
  transform:translateZ(0);
  will-change:transform;
  box-shadow:0 1px 0 rgba(18,24,32,.08),0 8px 18px rgba(18,24,32,.04)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  border-radius:14px 14px 0 0;
}
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead{
  margin-left:-18px!important;
  margin-right:-18px!important;
}

/* JS-backed floating section headers v31 */
#purchase-planning-page .ppx-js-floating{
  position:fixed!important;
  top:8px!important;
  left:var(--ppx-float-left)!important;
  width:var(--ppx-float-width)!important;
  box-sizing:border-box!important;
  z-index:250!important;
  margin-top:0!important;
  margin-bottom:0!important;
  transform:none!important;
  border:1px solid #e7e9ec!important;
  border-radius:12px!important;
  box-shadow:0 10px 28px rgba(18,24,32,.10)!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
#purchase-planning-page .ppx-floating-subhead.ppx-js-floating{
  padding:12px 18px!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Purchase Planner table readability + recommendation recovery v32 */
.ppx-lost-grid{table-layout:fixed!important}
.ppx-lost-grid th,.ppx-lost-grid td{vertical-align:middle!important}
.ppx-system-suggestion{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.ppx-system-suggestion small{display:inline!important;margin-left:5px!important;color:#9aa1aa!important;font-size:9px!important}
.ppx-lost-grid td .ppx-reason{display:none!important}
#ppxRecommendationSection .ppx-analysis-scroll{overflow-x:auto!important;overflow-y:visible!important}
#ppxRecommendationSection .ppx-analysis-table{table-layout:auto!important;min-width:1420px!important;width:100%!important}
#ppxRecommendationSection .ppx-analysis-table th,
#ppxRecommendationSection .ppx-analysis-table td{white-space:nowrap!important;padding:10px 11px!important}
#ppxRecommendationSection .ppx-analysis-table th:nth-child(2),
#ppxRecommendationSection .ppx-analysis-table td:nth-child(2){min-width:220px;max-width:280px;overflow:hidden!important;text-overflow:ellipsis!important}
#ppxRecommendationSection .ppx-analysis-table th{line-height:1.2!important}

/* Purchase Planner v39 — mirror Supplier Orders sticky stack exactly */
#purchase-planning-page,
#purchase-planning-page>.ppx,
#purchase-planning-page .ppx-grid,
#purchase-planning-page #ppxDemandAnalysisSection,
#purchase-planning-page .ppx-demand-inputs,
#purchase-planning-page #ppxResellerSection,
#purchase-planning-page #ppxLostDemandSection,
#purchase-planning-page #ppxRecommendationSection,
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-analysis-scroll,
#purchase-planning-page #ppxResellerSection>.ppx-analysis-scroll,
#purchase-planning-page #ppxLostDemandSection>.ppx-analysis-scroll,
#purchase-planning-page #ppxRecommendationSection>.ppx-analysis-scroll{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
}
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:56px!important;
  z-index:90!important;
  margin-top:0!important;
  transform:none!important;
  will-change:auto!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:saturate(180%) blur(20px)!important;
  -webkit-backdrop-filter:saturate(180%) blur(20px)!important;
  box-shadow:0 1px 0 rgba(0,0,0,.05),0 10px 24px rgba(0,0,0,.035)!important;
}
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead{
  background:rgba(250,251,252,.98)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{
  display:table-header-group!important;
  position:-webkit-sticky!important;
  position:sticky!important;
  top:calc(56px + var(--ppx-section-head-height,72px))!important;
  z-index:85!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:saturate(180%) blur(20px)!important;
  -webkit-backdrop-filter:saturate(180%) blur(20px)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead th{
  position:static!important;
  top:auto!important;
  background:rgba(255,255,255,.97)!important;
}
#purchase-planning-page .ppx-freeze-shell{display:none!important}
@media(max-width:1000px){
 #purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
 #purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
 #purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
 #purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{top:54px!important}
 #purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{top:calc(54px + var(--ppx-section-head-height,72px))!important}
}

/* Purchase Planner v40 — anchor sticky stack below actual app top bar */
#purchase-planning-page{--ppx-sticky-viewport-top:78px}
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  top:var(--ppx-sticky-viewport-top)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{
  top:calc(var(--ppx-sticky-viewport-top) + var(--ppx-section-head-height,72px))!important;
}

/* Purchase Planner v41 — exact Supplier Orders dock layering */
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:56px!important;
  z-index:110!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:saturate(180%) blur(20px)!important;
  -webkit-backdrop-filter:saturate(180%) blur(20px)!important;
  box-shadow:0 1px 0 rgba(0,0,0,.05),0 10px 24px rgba(0,0,0,.035)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{
  display:table-header-group!important;
  position:-webkit-sticky!important;
  position:sticky!important;
  top:calc(56px + var(--ppx-section-head-height,72px))!important;
  z-index:105!important;
  background:rgba(255,255,255,.97)!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead th{
  position:static!important;
  background:rgba(255,255,255,.97)!important;
}
@media(max-width:1000px){
 #purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
 #purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
 #purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
 #purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{top:54px!important}
 #purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
 #purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{top:calc(54px + var(--ppx-section-head-height,72px))!important}
}

/* Purchase Planner sticky correction: keep content inside app canvas; only column headers stay visible */
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head,
#purchase-planning-page #ppxResellerSection>.ppx-floating-subhead,
#purchase-planning-page #ppxLostDemandSection>.ppx-floating-subhead,
#purchase-planning-page #ppxRecommendationSection>.ppx-floating-head{
  position:static!important;
  top:auto!important;
  left:auto!important;
  width:auto!important;
  z-index:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  transform:none!important;
  box-shadow:none!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-scroll,
#purchase-planning-page #ppxResellerSection .ppx-analysis-scroll,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-scroll,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-scroll{
  overflow-x:auto!important;
  overflow-y:visible!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxResellerSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead th,
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead th{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:78px!important;
  z-index:95!important;
  background:rgba(250,251,252,.98)!important;
  backdrop-filter:saturate(180%) blur(18px)!important;
  -webkit-backdrop-filter:saturate(180%) blur(18px)!important;
  box-shadow:inset 0 -1px #e6e9ed!important;
}
@media(max-width:1000px){
 #purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table thead th,
 #purchase-planning-page #ppxResellerSection .ppx-analysis-table thead th,
 #purchase-planning-page #ppxLostDemandSection .ppx-analysis-table thead th,
 #purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead th{top:72px!important}
}

/* Planner centered collapse handles */
#purchase-planning-page [data-ppx-collapsible]>.ppx-floating-head,
#purchase-planning-page [data-ppx-collapsible]>.ppx-floating-subhead{
  position:relative!important;
}
#purchase-planning-page .ppx-collapse-center{
  position:absolute!important;
  left:50%!important;
  bottom:-14px!important;
  transform:translateX(-50%)!important;
  margin:0!important;
  width:38px!important;
  height:28px!important;
  border-radius:0 0 10px 10px!important;
  border-top:0!important;
  z-index:6!important;
  display:grid!important;
  place-items:center!important;
  font-size:16px!important;
  line-height:1!important;
  background:#fff!important;
  box-shadow:0 3px 8px rgba(15,23,42,.08)!important;
}
#purchase-planning-page [data-ppx-collapsible].is-collapsed>.ppx-floating-head,
#purchase-planning-page [data-ppx-collapsible].is-collapsed>.ppx-floating-subhead{
  margin-bottom:14px!important;
}

/* Planner polish: muted recommendation note + stable table header row */
#ppxRecommendationSection .ppx-callout{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:12px!important;
  line-height:1.45!important;
  font-weight:400!important;
  color:#7b8491!important;
  background:transparent!important;
  border:0!important;
  padding:10px 0 12px!important;
  margin:0!important;
}
#purchase-planning-page .ppx-analysis-table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
#purchase-planning-page .ppx-analysis-table thead{
  display:table-header-group!important;
  position:static!important;
}
#purchase-planning-page .ppx-analysis-table thead tr{
  display:table-row!important;
}
#purchase-planning-page .ppx-analysis-table thead th{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:78px!important;
  z-index:120!important;
  display:table-cell!important;
  box-sizing:border-box!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
  background:rgba(250,251,252,.99)!important;
  color:#6f7885!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  box-shadow:inset 0 -1px #e6e9ed!important;
}
#purchase-planning-page .ppx-analysis-table tbody td{
  position:static!important;
}
#purchase-planning-page .ppx-freeze-columns,
#purchase-planning-page .ppx-freeze-shell{
  display:none!important;
}
@media(max-width:1000px){
 #purchase-planning-page .ppx-analysis-table thead th{top:72px!important}
}

/* Planner sticky header stacking fix: never let first data row bleed above header */
#purchase-planning-page .ppx-analysis-table{
  position:relative!important;
}
#purchase-planning-page .ppx-analysis-table thead{
  position:relative!important;
  z-index:130!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table thead tr{
  position:relative!important;
  z-index:130!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table thead th{
  z-index:140!important;
  background:#fafbfc!important;
  opacity:1!important;
}
#purchase-planning-page .ppx-analysis-table tbody,
#purchase-planning-page .ppx-analysis-table tbody tr,
#purchase-planning-page .ppx-analysis-table tbody td{
  position:relative!important;
  z-index:1!important;
}

/* Planner header v5: make THEAD itself the literal sticky header row */
#purchase-planning-page .ppx-analysis-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  position:relative!important;
}
#purchase-planning-page .ppx-analysis-table thead{
  display:table-header-group!important;
  position:-webkit-sticky!important;
  position:sticky!important;
  top:78px!important;
  z-index:200!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table thead tr{
  display:table-row!important;
  position:static!important;
  z-index:auto!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table thead th{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  display:table-cell!important;
  background:#fafbfc!important;
  opacity:1!important;
  box-shadow:inset 0 -1px #e6e9ed!important;
}
#purchase-planning-page .ppx-analysis-table tbody,
#purchase-planning-page .ppx-analysis-table tbody tr,
#purchase-planning-page .ppx-analysis-table tbody td{
  position:static!important;
  z-index:auto!important;
}
@media(max-width:1000px){
 #purchase-planning-page .ppx-analysis-table thead{top:72px!important}
}

/* Planner header v6: lift literal sticky header one row */
#purchase-planning-page .ppx-analysis-table thead{
  top:38px!important;
}
@media(max-width:1000px){
 #purchase-planning-page .ppx-analysis-table thead{top:34px!important}
}

/* Planner header v7: dedicated literal header strip before data table */
#purchase-planning-page .ppx-has-literal-header thead{display:none!important}
#purchase-planning-page .ppx-literal-header{
  position:-webkit-sticky!important;
  position:sticky!important;
  top:78px!important;
  z-index:220!important;
  display:grid!important;
  align-items:center!important;
  min-height:36px!important;
  background:#fafbfc!important;
  border-top:1px solid #edf0f3!important;
  border-bottom:1px solid #e5e8ec!important;
  color:#6f7885!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  box-sizing:border-box!important;
}
#purchase-planning-page .ppx-literal-header>div{
  min-width:0!important;
  padding:10px 10px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#purchase-planning-page .ppx-literal-header[data-section="ppxDemandAnalysisSection"]{grid-template-columns:1fr 1.8fr 1fr 1fr 1fr .8fr 1.2fr!important}
#purchase-planning-page .ppx-literal-header[data-section="ppxResellerSection"]{grid-template-columns:1fr .7fr 2fr!important}
#purchase-planning-page .ppx-literal-header[data-section="ppxLostDemandSection"]{grid-template-columns:.8fr .85fr 1.15fr 1.55fr .8fr .8fr 1.2fr .7fr .7fr!important}
#purchase-planning-page .ppx-literal-header[data-section="ppxRecommendationSection"]{grid-template-columns:.8fr 1.7fr .85fr .7fr .7fr .9fr .9fr .8fr .7fr .9fr .85fr .8fr!important}
#purchase-planning-page .ppx-analysis-table tbody{display:table-row-group!important}
@media(max-width:1000px){#purchase-planning-page .ppx-literal-header{top:72px!important}}

/* Planner alignment + Lost Demand filters */
#purchase-planning-page .ppx-analysis-scroll{margin-top:0!important;padding-top:0!important}
#purchase-planning-page .ppx-literal-header{margin-top:0!important}
#purchase-planning-page .ppx-lost-grid-wrap{margin-top:0!important}
#purchase-planning-page .ppx-lost-filterbar{
 display:flex;align-items:center;gap:8px;flex-wrap:wrap;
 padding:10px 8px;border-top:1px solid #edf0f3;background:#fff;
}
#purchase-planning-page .ppx-lost-search{
 width:250px;min-width:210px;height:32px;border:1px solid #dfe3e8;border-radius:8px;
 padding:0 10px;background:#fff;color:#222;font:12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 outline:none;
}
#purchase-planning-page .ppx-lost-search:focus{border-color:#aab3bf;box-shadow:0 0 0 2px rgba(15,23,42,.05)}
#purchase-planning-page .ppx-lost-filterchips{display:flex;gap:5px;flex-wrap:wrap;align-items:center}
#purchase-planning-page .ppx-lost-filterchips button{
 height:28px;padding:0 9px;border:1px solid #e2e5e9;border-radius:999px;background:#f7f8f9;
 color:#69727d;font:600 10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer;
}
#purchase-planning-page .ppx-lost-filterchips button.is-active{background:#20252b;color:#fff;border-color:#20252b}
#purchase-planning-page #ppxLostFilterCount{margin-left:auto;color:#8a939e;font-size:10px;white-space:nowrap}
#purchase-planning-page .ppx-lost-demand-box>p{margin-bottom:8px!important}
#purchase-planning-page .ppx-lost-demand-box .ppx-demand-actions{margin-bottom:8px!important}
#purchase-planning-page .ppx-lost-demand-box .ppx-analysis-table,
#purchase-planning-page #ppxDemandAnalysisSection .ppx-analysis-table{margin-top:0!important}
#purchase-planning-page .ppx-literal-header[data-section="ppxLostDemandSection"]{margin-top:0!important}
@media(max-width:900px){
 #purchase-planning-page .ppx-lost-search{width:100%}
 #purchase-planning-page #ppxLostFilterCount{width:100%;margin-left:0}
}

/* Planner first-column header cleanup: prevent legacy sticky header layers from bleeding through */
#purchase-planning-page .ppx-has-literal-header thead,
#purchase-planning-page .ppx-has-literal-header thead tr,
#purchase-planning-page .ppx-has-literal-header thead th{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
#purchase-planning-page .ppx-literal-header{
  isolation:isolate!important;
  overflow:hidden!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-literal-header>div{
  position:relative!important;
  z-index:2!important;
  overflow:hidden!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-literal-header>div:first-child{
  white-space:nowrap!important;
  text-overflow:clip!important;
}

/* Planner header v8: native THEAD only; it occupies real table space before TBODY. */
#purchase-planning-page .ppx-literal-header{display:none!important}
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) thead{
  display:table-header-group!important;
  visibility:visible!important;
  opacity:1!important;
  position:static!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) thead tr{
  display:table-row!important;
  position:static!important;
}
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) thead th{
  display:table-cell!important;
  visibility:visible!important;
  opacity:1!important;
  position:sticky!important;
  top:78px!important;
  z-index:40!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) tbody,
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) tbody tr,
#purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) tbody td{
  position:static!important;
  z-index:auto!important;
}
@media(max-width:1000px){
 #purchase-planning-page .ppx-analysis-table:not(.ppx-has-literal-header) thead th{top:72px!important}
}

/* Planner header v9: correctness first. THEAD is always physical row #1.
   No sticky/relative positioning may move it below a TBODY row. */
#purchase-planning-page .ppx-analysis-table thead,
#purchase-planning-page .ppx-analysis-table thead tr,
#purchase-planning-page .ppx-analysis-table thead th{
  position:static!important;
  top:auto!important;
  transform:none!important;
}
#purchase-planning-page .ppx-analysis-table thead{
  display:table-header-group!important;
  visibility:visible!important;
  opacity:1!important;
}
#purchase-planning-page .ppx-analysis-table thead tr{display:table-row!important}
#purchase-planning-page .ppx-analysis-table thead th{
  display:table-cell!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:auto!important;
  background:#fafbfc!important;
}
#purchase-planning-page .ppx-analysis-table tbody{
  display:table-row-group!important;
}
#purchase-planning-page .ppx-analysis-table tbody tr{
  display:table-row!important;
  position:static!important;
  transform:none!important;
}
#purchase-planning-page .ppx-analysis-table tbody td{
  position:static!important;
  top:auto!important;
  transform:none!important;
  z-index:auto!important;
}

/* Demand Analysis v10: literal first row, no THEAD/sticky table-group ambiguity. */
#ppxDemandAnalysisSection .ppx-inline-column-header{
  display:table-row!important;
  position:static!important;
  transform:none!important;
  background:#fafbfc!important;
}
#ppxDemandAnalysisSection .ppx-inline-column-header th{
  display:table-cell!important;
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  padding:11px 10px!important;
  background:#fafbfc!important;
  color:#747c86!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  text-align:left!important;
  border-bottom:1px solid #e9ecef!important;
}
/* Demand Analysis v12: keep the working normal layout; freeze column labels only. */
#purchase-planning-page #ppxDemandAnalysisSection{
  overflow:visible!important;
}
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head{
  position:static!important;
  top:auto!important;
  z-index:auto!important;
  transform:none!important;
  box-shadow:none!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-inline-column-header th{
  position:sticky!important;
  top:52px!important;
  z-index:70!important;
  background:#fafbfc!important;
  box-shadow:inset 0 -1px #e9ecef!important;
}
@media(max-width:1000px){
 #purchase-planning-page #ppxDemandAnalysisSection .ppx-inline-column-header th{top:48px!important}
}

/* Demand Analysis recovery: restore the known-good visible window and row order. */
#purchase-planning-page #ppxDemandAnalysisSection>.ppx-floating-head{
  position:static!important;top:auto!important;z-index:auto!important;transform:none!important;box-shadow:none!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-inline-column-header{
  display:table-row!important;position:static!important;transform:none!important;background:#fafbfc!important;
}
#purchase-planning-page #ppxDemandAnalysisSection .ppx-inline-column-header th{
  display:table-cell!important;position:static!important;top:auto!important;z-index:auto!important;
  padding:11px 10px!important;background:#fafbfc!important;color:#747c86!important;font-size:9px!important;
  font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase!important;text-align:left!important;
  border-bottom:1px solid #e9ecef!important;
}

/* Manual Demand Analysis freeze: default remains the confirmed working layout. */
#ppxDemandAnalysisSection .ppx-demand-head-actions{display:flex;align-items:center;gap:10px}
#ppxDemandAnalysisSection .ppx-freeze-btn{border:1px solid #dfe3e8;background:#fff;color:#59616c;border-radius:8px;padding:6px 9px;font-size:10px;font-weight:600;cursor:pointer;white-space:nowrap}
#ppxDemandAnalysisSection .ppx-freeze-btn[aria-pressed="true"]{background:#17191c;color:#fff;border-color:#17191c}
#ppxDemandAnalysisSection.ppx-manual-freeze>.ppx-floating-head{position:sticky!important;top:52px!important;z-index:80!important;background:#fff!important;box-shadow:0 1px 0 #e6e9ed!important}
#ppxDemandAnalysisSection.ppx-manual-freeze .ppx-inline-column-header th{position:sticky!important;top:var(--ppx-manual-demand-columns-top,132px)!important;z-index:79!important;background:#fafbfc!important}

/* Manual freeze v2: explicit state wins over the known-good recovery defaults. */
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze>.ppx-floating-head{
  position:sticky!important;
  top:52px!important;
  z-index:90!important;
  transform:none!important;
  background:#fff!important;
  box-shadow:0 1px 0 #e6e9ed!important;
}
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze .ppx-inline-column-header th{
  position:sticky!important;
  top:var(--ppx-manual-demand-columns-top,132px)!important;
  z-index:89!important;
  transform:none!important;
  background:#fafbfc!important;
  box-shadow:inset 0 -1px #e6e9ed!important;
}

/* Manual freeze v3: one viewport-fixed clone; never move the live table/header. */
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze>.ppx-floating-head,
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze .ppx-inline-column-header th{
 position:static!important;top:auto!important;z-index:auto!important;transform:none!important;
}
#ppxDemandFrozenClone{
 position:fixed!important;left:var(--sidebar-w,52px)!important;right:0!important;top:0!important;z-index:10000!important;
 background:#fff!important;border-bottom:1px solid #dfe3e8!important;box-shadow:0 5px 14px rgba(15,23,42,.08)!important;
}
#ppxDemandFrozenClone .ppx-history-head{padding:14px 20px!important;background:#fff!important}
#ppxDemandFrozenClone .ppx-demand-head-actions{display:flex;align-items:center;gap:10px}
#ppxDemandFrozenClone .ppx-demand-frozen-labels{
 display:grid!important;grid-template-columns:15% 15% 15% 15% 15% 15% 10%!important;align-items:center!important;
 min-height:34px!important;padding:0 20px!important;box-sizing:border-box!important;background:#fafbfc!important;border-top:1px solid #eef0f2!important;
}
#ppxDemandFrozenClone .ppx-demand-frozen-labels span{
 color:#747c86!important;font-size:9px!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase!important;white-space:nowrap!important;
}

/* Manual freeze v4: no clone. Freeze the original header and original labels only. */
#ppxDemandFrozenClone{display:none!important}
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze{
 overflow:visible!important;
}
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze>.ppx-floating-head{
 position:sticky!important;top:52px!important;z-index:100!important;
 background:#fff!important;transform:none!important;
 box-shadow:0 1px 0 #e6e9ed!important;
}
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze .ppx-inline-column-header th{
 position:sticky!important;
 top:var(--ppx-manual-demand-columns-top,132px)!important;
 z-index:99!important;
 background:#fafbfc!important;transform:none!important;
 box-shadow:inset 0 -1px #e6e9ed!important;
}

/* Manual freeze v5: title sticks; JS anchors the original label cells directly beneath it. */
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze>.ppx-floating-head{
 position:sticky!important;top:52px!important;z-index:100!important;background:#fff!important;transform:none!important;
 box-shadow:0 1px 0 #e6e9ed!important;
}
#purchase-planning-page #ppxDemandAnalysisSection.ppx-manual-freeze .ppx-inline-column-header th{
 background:#fafbfc!important;transform:none!important;box-shadow:inset 0 -1px #e6e9ed!important;
}

/* Demand freeze v6: one original rectangle, one label source, one sticky element. */
#ppxDemandAnalysisSection .ppx-demand-freeze-block{position:relative!important;background:#fff!important;z-index:2!important}
#ppxDemandAnalysisSection .ppx-demand-freeze-block.is-frozen{
 position:sticky!important;top:52px!important;z-index:120!important;background:#fff!important;
 box-shadow:0 4px 12px rgba(15,23,42,.07)!important;
}
#ppxDemandAnalysisSection .ppx-demand-freeze-block .ppx-floating-head{
 position:relative!important;top:auto!important;z-index:auto!important;transform:none!important;box-shadow:none!important;
}
#ppxDemandAnalysisSection .ppx-demand-label-bar{
 display:grid!important;grid-template-columns:15% 15% 15% 15% 15% 15% 10%!important;
 align-items:center!important;min-height:34px!important;padding:0 10px!important;box-sizing:border-box!important;
 background:#fafbfc!important;border-top:1px solid #eef0f2!important;border-bottom:1px solid #e6e9ed!important;
}
#ppxDemandAnalysisSection .ppx-demand-label-bar span{
 color:#747c86!important;font-size:9px!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase!important;white-space:nowrap!important;
}
#ppxDemandAnalysisSection .ppx-analysis-table tbody td{position:static!important}
#ppxDemandAnalysisSection .ppx-inline-column-header{display:none!important}

/* Demand freeze v7: persistent viewport pin until explicit Unfreeze. */
#ppxDemandAnalysisSection:has(.ppx-demand-freeze-block.is-frozen){
 padding-top:var(--ppx-freeze-space,0px)!important;
}
#ppxDemandAnalysisSection .ppx-demand-freeze-block.is-frozen{
 position:fixed!important;
 top:52px!important;
 left:var(--ppx-freeze-left)!important;
 width:var(--ppx-freeze-width)!important;
 right:auto!important;
 z-index:120!important;
 box-sizing:border-box!important;
 background:#fff!important;
 box-shadow:0 4px 12px rgba(15,23,42,.07)!important;
}

/* Armed freeze for Reseller, Lost Demand, Purchase Recommendation. */
#purchase-planning-page .ppx-section-freeze-block{position:relative!important;background:#fff!important;z-index:2!important}
#purchase-planning-page .ppx-section-freeze-block.is-frozen{position:fixed!important;top:52px!important;left:var(--ppx-freeze-left)!important;width:var(--ppx-freeze-width)!important;right:auto!important;z-index:120!important;box-sizing:border-box!important;background:#fff!important;box-shadow:0 4px 12px rgba(15,23,42,.07)!important}
#purchase-planning-page .ppx-section-freeze-block .ppx-floating-subhead,
#purchase-planning-page .ppx-section-freeze-block .ppx-floating-head{position:relative!important;top:auto!important;z-index:auto!important;transform:none!important;box-shadow:none!important}
#purchase-planning-page .ppx-section-freeze-btn{margin-left:auto!important}
#purchase-planning-page .ppx-section-label-bar{display:grid!important;align-items:center!important;min-height:34px!important;padding:0 10px!important;box-sizing:border-box!important;background:#fafbfc!important;border-top:1px solid #eef0f2!important;border-bottom:1px solid #e6e9ed!important}
#purchase-planning-page .ppx-section-label-bar.cols-3{grid-template-columns:33.333% 33.333% 33.334%!important}
#purchase-planning-page .ppx-section-label-bar.cols-9{grid-template-columns:9% 10% 14% 20% 10% 10% 13% 7% 7%!important}
#purchase-planning-page .ppx-section-label-bar.cols-12{grid-template-columns:8% 14% 8% 7% 7% 9% 8% 7% 7% 10% 8% 7%!important}
#purchase-planning-page .ppx-section-label-bar span{color:#747c86!important;font-size:9px!important;font-weight:700!important;letter-spacing:.08em!important;text-transform:uppercase!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#ppxResellerSection:has(.ppx-section-freeze-block.is-frozen),
#ppxLostDemandSection:has(.ppx-section-freeze-block.is-frozen),
#ppxRecommendationSection:has(.ppx-section-freeze-block.is-frozen){padding-top:var(--ppx-freeze-space,0px)!important}

/* Lost Demand: controls stay in title row; data labels belong directly above data. */
#ppxLostDemandSection .ppx-lost-head-left{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important}
#ppxLostDemandSection .ppx-lost-head-left .ppx-section-freeze-btn{margin:0!important;order:0!important;flex:0 0 auto!important}
#ppxLostDemandSection .ppx-lost-head-left h4{margin:0!important;order:1!important}
#ppxLostDemandSection .ppx-floating-subhead>.ppx-demand-badge{margin-left:auto!important;margin-right:0!important}
#ppxLostDemandSection .ppx-lost-entry-labels{margin-top:10px!important;margin-bottom:0!important}
#ppxLostDemandSection .ppx-lost-grid-wrap{margin-top:0!important}

/* Planner freeze polish v8: control left of original title, exact row/header alignment. */
#purchase-planning-page .ppx-freeze-title-left{
 display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;
}
#purchase-planning-page .ppx-freeze-title-left h4{margin:0!important;white-space:nowrap!important}
#purchase-planning-page .ppx-freeze-title-left .ppx-section-freeze-btn{
 margin:0!important;flex:0 0 auto!important;
 padding:5px 9px!important;border:1px solid #d8dde3!important;border-radius:7px!important;
 background:#fff!important;color:#4b5563!important;
 font:600 11px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
 box-shadow:none!important;
}
#purchase-planning-page .ppx-freeze-title-left .ppx-section-freeze-btn:hover{background:#f5f6f7!important}
#ppxResellerSection .ppx-floating-subhead>.ppx-demand-badge,
#ppxLostDemandSection .ppx-floating-subhead>.ppx-demand-badge{margin-left:auto!important;margin-right:0!important}
#ppxResellerSection .ppx-reseller-entry-labels{margin-top:10px!important;margin-bottom:0!important}
#ppxResellerSection .ppx-analysis-scroll{margin-top:0!important}

/* Match labels to actual table-cell geometry. */
#ppxRecommendationSection .ppx-section-label-bar.cols-12{
 grid-template-columns:16% 16% 7% 6% 7% 9% 9% 7% 7% 10% 8% 8%!important;
 padding-left:10px!important;padding-right:10px!important;
}
#ppxRecommendationSection .ppx-analysis-table{table-layout:fixed!important;width:100%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(1){width:16%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(2){width:16%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(3){width:7%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(4){width:6%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(5){width:7%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(6){width:9%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(7){width:9%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(8){width:7%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(9){width:7%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(10){width:10%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(11){width:8%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td:nth-child(12){width:8%!important}

/* Freeze blocks v9: full human-input control area freezes; row starts align with labels. */
#ppxResellerFreezeBlock,
#ppxLostFreezeBlock{
 background:#fff!important;
 box-sizing:border-box!important;
 width:100%!important;
}
#ppxResellerFreezeBlock.is-frozen,
#ppxLostFreezeBlock.is-frozen{
 max-height:calc(100vh - 48px)!important;
 overflow:auto!important;
}
#ppxDemandAnalysisSection .ppx-analysis-table tbody td:first-child{
 padding-left:18px!important;
}
#ppxResellerSection .ppx-analysis-table tbody td:first-child{
 padding-left:18px!important;
}
#ppxLostDemandSection .ppx-analysis-table tbody td:first-child{
 padding-left:18px!important;
}
#ppxDemandAnalysisSection .ppx-demand-label-bar,
#ppxResellerSection .ppx-section-label-bar,
#ppxLostDemandSection .ppx-section-label-bar{
 padding-left:18px!important;
}

/* Recommendation alignment v10: header strip and data table share the exact same 12-column grid. */
#ppxRecommendationSection{
 --ppx-reco-cols:16% 16% 7% 6% 7% 9% 9% 7% 7% 10% 8% 8%;
}
#ppxRecommendationSection .ppx-section-label-bar.cols-12{
 grid-template-columns:var(--ppx-reco-cols)!important;
 padding-left:0!important;
 padding-right:0!important;
}
#ppxRecommendationSection .ppx-section-label-bar.cols-12>span{
 box-sizing:border-box!important;
 padding-left:7px!important;
 padding-right:7px!important;
}
#ppxRecommendationSection .ppx-analysis-table{
 table-layout:fixed!important;
 width:100%!important;
 min-width:0!important;
}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(1){width:16%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(2){width:16%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(3){width:7%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(4){width:6%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(5){width:7%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(6){width:9%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(7){width:9%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(8){width:7%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(9){width:7%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(10){width:10%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(11){width:8%!important}
#ppxRecommendationSection .ppx-reco-colgroup col:nth-child(12){width:8%!important}
#ppxRecommendationSection .ppx-analysis-table tbody td{
 width:auto!important;
 box-sizing:border-box!important;
 padding-left:7px!important;
 padding-right:7px!important;
}

/* Demand Library workspace */
#purchase-planning-page .ppx-workspace-tabs{display:inline-flex;gap:4px;padding:4px;margin:2px 0 16px;border:1px solid #e5e7eb;border-radius:10px;background:#f5f6f7}
#purchase-planning-page .ppx-workspace-tab{border:0;background:transparent;color:#6b7280;border-radius:7px;padding:8px 14px;font:600 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;cursor:pointer}
#purchase-planning-page .ppx-workspace-tab.is-active{background:#fff;color:#17191c;box-shadow:0 1px 3px rgba(15,23,42,.08)}
#purchase-planning-page[data-ppx-view="planner"] .ppx-library-only{display:none!important}
#purchase-planning-page[data-ppx-view="library"] .ppx-planner-only{display:none!important}
#purchase-planning-page[data-ppx-view="library"] .ppx-grid{display:grid!important}
#purchase-planning-page .ppx-sku-lookup-bar{display:flex;gap:10px;padding:18px 20px;border-top:1px solid #eef0f2}
#purchase-planning-page .ppx-sku-lookup-bar input{flex:1;min-width:0;border:1px solid #dfe3e8;border-radius:9px;padding:10px 12px;font:500 13px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;outline:none}
#purchase-planning-page .ppx-sku-lookup-bar input:focus{border-color:#9ca3af;box-shadow:0 0 0 3px rgba(15,23,42,.05)}
#purchase-planning-page .ppx-sku-demand-result{padding:0 20px 20px}
#purchase-planning-page .ppx-sku-demand-empty{padding:26px;border:1px dashed #dfe3e8;border-radius:10px;color:#8a929d;text-align:center;font-size:12px}
#purchase-planning-page .ppx-sku-demand-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 0 12px;border-top:1px solid #eef0f2}
#purchase-planning-page .ppx-sku-demand-head h3{margin:2px 0 0;font-size:16px}
#purchase-planning-page .ppx-sku-demand-head h3 span{margin-left:8px;color:#7b8491;font-size:12px;font-weight:500}
#purchase-planning-page .ppx-trend-pill{border-radius:999px;padding:6px 10px;background:#f2f4f6;color:#59616c;font-size:11px;font-weight:700;white-space:nowrap}
#purchase-planning-page .ppx-trend-pill.up{background:#edf7f0;color:#287a43}
#purchase-planning-page .ppx-trend-pill.down{background:#fff1f0;color:#b4433b}
#purchase-planning-page .ppx-trend-pill.volatile{background:#fff7e8;color:#986a14}
#purchase-planning-page .ppx-sku-demand-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #e8ebee;border-radius:10px;overflow:hidden}
#purchase-planning-page .ppx-sku-demand-metrics>div{padding:13px 15px;border-right:1px solid #eef0f2}
#purchase-planning-page .ppx-sku-demand-metrics>div:last-child{border-right:0}
#purchase-planning-page .ppx-sku-demand-metrics span,#purchase-planning-page .ppx-sku-demand-metrics small{display:block;color:#8a929d;font-size:10px}
#purchase-planning-page .ppx-sku-demand-metrics b{display:block;margin:4px 0 2px;font-size:20px;color:#20242a}
#purchase-planning-page .ppx-demand-chart{margin-top:14px;padding:14px;border:1px solid #e8ebee;border-radius:10px;background:#fff;color:#3f4854}
#purchase-planning-page .ppx-demand-chart svg{display:block;width:100%;height:150px}
#purchase-planning-page .ppx-demand-chart-labels{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;margin-top:6px}
#purchase-planning-page .ppx-demand-chart-labels span{text-align:center;color:#7b8491;font-size:9px}
#purchase-planning-page .ppx-demand-chart-labels b,#purchase-planning-page .ppx-demand-chart-labels small{display:block;font-weight:500}
#purchase-planning-page .ppx-sku-demand-summary{margin:12px 0 0;padding:11px 13px;border-radius:8px;background:#f7f8f9;color:#66707c;font-size:11px;line-height:1.5}
@media(max-width:900px){#purchase-planning-page .ppx-sku-demand-metrics{grid-template-columns:repeat(2,1fr)}#purchase-planning-page .ppx-demand-chart-labels{overflow-x:auto;grid-template-columns:repeat(12,70px)}}

/* Global app dark-mode integration. Purchase Planning historically owns many explicit light surfaces. */
body.app-dark #purchase-planning-page{background:#0b0d11!important;color:#f5f7fa!important}
body.app-dark #purchase-planning-page .ppx-history-card,
body.app-dark #purchase-planning-page .ppx-demand-freeze-block,
body.app-dark #purchase-planning-page .ppx-section-freeze-block,
body.app-dark #purchase-planning-page #ppxResellerFreezeBlock,
body.app-dark #purchase-planning-page #ppxLostFreezeBlock,
body.app-dark #purchase-planning-page .ppx-demand-chart,
body.app-dark #purchase-planning-page .ppx-sku-demand-summary{
 background:#14181e!important;color:#f5f7fa!important;border-color:#2a3039!important;
}
body.app-dark #purchase-planning-page .ppx-floating-head,
body.app-dark #purchase-planning-page .ppx-floating-subhead,
body.app-dark #purchase-planning-page .ppx-demand-label-bar,
body.app-dark #purchase-planning-page .ppx-section-label-bar,
body.app-dark #purchase-planning-page .ppx-inline-column-header th{
 background:#191e25!important;color:#c9d0d9!important;border-color:#2a3039!important;
}
body.app-dark #purchase-planning-page .ppx-analysis-table,
body.app-dark #purchase-planning-page .ppx-analysis-table tbody,
body.app-dark #purchase-planning-page .ppx-analysis-table tr{background:#14181e!important}
body.app-dark #purchase-planning-page .ppx-analysis-table td{color:#e8ecf1!important;border-color:#2a3039!important}
body.app-dark #purchase-planning-page .ppx-analysis-table td:nth-child(2),
body.app-dark #purchase-planning-page .ppx-analysis-table td .ppx-product-name{color:#c8d0da!important}
body.app-dark #purchase-planning-page .ppx-demand-label-bar span,
body.app-dark #purchase-planning-page .ppx-section-label-bar span{color:#aeb7c3!important}
body.app-dark #purchase-planning-page .ppx-freeze-btn,
body.app-dark #purchase-planning-page .ppx-section-freeze-btn{
 background:#202630!important;color:#e9edf2!important;border-color:#343b46!important;
}
body.app-dark #purchase-planning-page .ppx-workspace-tabs{background:#191e25!important;border-color:#2a3039!important}
body.app-dark #purchase-planning-page .ppx-workspace-tab{color:#aeb7c3!important}
body.app-dark #purchase-planning-page .ppx-workspace-tab.is-active{background:#2a3039!important;color:#fff!important;box-shadow:none!important}
body.app-dark #purchase-planning-page .ppx-sku-demand-metrics,
body.app-dark #purchase-planning-page .ppx-sku-demand-metrics>div{border-color:#2a3039!important}
body.app-dark #purchase-planning-page .ppx-sku-demand-metrics b{color:#fff!important}
body.app-dark #purchase-planning-page .ppx-sku-demand-metrics span,
body.app-dark #purchase-planning-page .ppx-sku-demand-metrics small,
body.app-dark #purchase-planning-page .ppx-sku-demand-empty{color:#9fa8b4!important}

/* Human Evidence: browser table-row !important must not override filtered rows. */
#purchase-planning-page #ppxLostDemandBody tr[hidden]{display:none!important}
/* Keep the frozen label grid and data cells on identical nine-column tracks. */
#purchase-planning-page #ppxLostDemandSection{
 --ppx-lost-columns:9% 10% 14% 20% 10% 10% 13% 7% 7%;
}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-entry-labels{
 grid-template-columns:var(--ppx-lost-columns)!important;
 box-sizing:border-box!important;
 width:100%!important;
}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid{
 table-layout:fixed!important;
 width:100%!important;
 min-width:0!important;
 border-collapse:collapse!important;
}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td{box-sizing:border-box!important;min-width:0!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(1){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(2){width:10%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(3){width:14%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(4){width:20%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(5){width:10%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(6){width:10%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(7){width:13%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(8){width:7%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(9){width:7%!important}
#purchase-planning-page #ppxExportLostDemandXlsx{
 border:1px solid #dce1e7;border-radius:8px;background:#20252b;color:#fff;
 font-size:11px;font-weight:700;padding:8px 12px;cursor:pointer;white-space:nowrap;
}

/* Recommendation table: one native table owns BOTH headings and data.
   A detached grid header cannot reliably track browser table layout. */
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table{
 table-layout:fixed!important;width:100%!important;min-width:1240px!important;border-collapse:collapse!important;
}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(1){width:10%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(2){width:19%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(3){width:8%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(4){width:6%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(5){width:6%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(6){width:9%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(7){width:8%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(8){width:7%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(9){width:6%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(10){width:9%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(11){width:7%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-reco-colgroup col:nth-child(12){width:5%!important}
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead{display:table-header-group!important;visibility:visible!important}
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table thead th{
 box-sizing:border-box!important;text-align:left!important;vertical-align:middle!important;
 white-space:normal!important;overflow-wrap:break-word!important;
 font-size:10px!important;line-height:1.25!important;letter-spacing:.04em!important;
 padding:11px 9px!important;background:#fafbfc!important;color:#69727d!important;
}
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-table tbody td{
 box-sizing:border-box!important;padding:11px 9px!important;min-width:0!important;
 overflow:hidden!important;text-overflow:ellipsis!important;
}
#purchase-planning-page #ppxRecommendationSection .ppx-analysis-scroll{overflow-x:auto!important}

/* Lost Demand: ten identical header/data tracks, PO impact at far right. */
#purchase-planning-page #ppxLostDemandSection{--ppx-lost-columns:9% 9% 12% 19% 9% 9% 12% 6% 6% 9%}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid{min-width:1200px!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(1){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(2){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(3){width:12%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(4){width:19%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(5){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(6){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(7){width:12%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(8){width:6%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(9){width:6%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-grid td:nth-child(10){width:9%!important}
#purchase-planning-page #ppxLostDemandSection .ppx-lost-impact{white-space:nowrap}
#purchase-planning-page #ppxLostDemandSection .ppx-impact-line{display:block;font-size:12px;color:#4b5563}
#purchase-planning-page #ppxLostDemandSection .ppx-impact-line strong{color:#1d2735}
#purchase-planning-page #ppxLostDemandSection .ppx-impact-delta{display:block;font-size:10px;color:#77808c;margin-top:3px}
#purchase-planning-page #ppxLostDemandSection .ppx-impact-delta.is-positive{color:#16805d;font-weight:700}
#purchase-planning-page #ppxLostDemandSection .ppx-impact-muted{font-size:11px;color:#8a929d}
