/* Demand v710: route-scoped tokens match the editable Figma composition. */
.ph-demand{--dm-bg:#f5f8fc;--dm-surface:#fff;--dm-blue-soft:#eef5ff;--dm-blue:#285d9f;--dm-orange-soft:#fff3e8;--dm-orange:#9a5a25;--dm-red-soft:#fff0f0;--dm-red:#a63d44;--dm-text:#20354e;--dm-muted:#637b93;--dm-border:#dae5f1;max-width:1450px;margin:auto;padding:20px 12px 28px;color:var(--dm-text);font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;min-width:0}
.ph-demand *{box-sizing:border-box}.ph-demand svg{width:20px;height:20px;flex-shrink:0}.dm-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.dm-heading h2{font-size:27px;line-height:1.25;letter-spacing:-.6px;margin:7px 0 6px;color:var(--dm-text)}.dm-heading p{margin:0;color:var(--dm-muted);font-size:13px}.dm-eyebrow{font-size:10px;letter-spacing:.13em;text-transform:uppercase;color:var(--dm-blue);font-weight:700}.dm-measure{display:flex;background:var(--dm-surface);border:1px solid var(--dm-border);border-radius:13px;padding:5px;gap:4px;flex-shrink:0}.ph-demand button{font:inherit;border:1px solid var(--dm-border);border-radius:9px;padding:10px 15px;background:white;color:var(--dm-blue);cursor:pointer;font-weight:600;line-height:1.3;min-height:40px}.ph-demand button:disabled{opacity:.45;cursor:default}.ph-demand button:hover:not(:disabled){border-color:#9fbcdc;background:var(--dm-blue-soft)}.ph-demand button:focus-visible,.ph-demand select:focus-visible,.ph-demand input:focus-visible,.ph-demand summary:focus-visible,.ph-demand-table:focus-visible{outline:3px solid #97bceb;outline-offset:2px}.dm-measure button{border-color:transparent;background:transparent;padding:10px 21px;min-width:110px}.dm-measure button.active{background:var(--dm-blue-soft);color:var(--dm-blue);box-shadow:0 1px 3px #16335612;border-color:#d9e7fa}
.ph-demand-toolbar{display:grid;grid-template-columns:1.5fr .7fr .85fr 1.15fr 1.25fr;gap:15px 16px;padding:20px;background:var(--dm-surface);border:1px solid var(--dm-border);border-radius:16px;box-shadow:0 4px 20px #1d3c6010}.ph-demand-toolbar label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:600;color:var(--dm-muted);min-width:0}.ph-demand-toolbar select,.ph-demand-toolbar input{width:100%;height:42px;font:13px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--dm-text);padding:9px 10px;border:1px solid var(--dm-border);border-radius:9px;background:#fff;min-width:0}.ph-demand-toolbar .dm-search{grid-column:auto}.dm-filter-actions{display:flex;align-items:end;justify-content:end;gap:8px}.ph-demand .dm-primary{background:var(--dm-blue);color:#fff;border-color:var(--dm-blue);flex:1}.ph-demand .dm-primary:hover:not(:disabled){background:#214f89;color:#fff}.ph-demand .dm-icon-button{width:42px;min-width:42px;height:42px;display:flex;justify-content:center;align-items:center;padding:9px}.dm-context{display:flex;gap:15px;justify-content:space-between;flex-wrap:wrap;margin:15px 2px;color:var(--dm-muted);font-size:11px}
.dm-notice{display:flex;align-items:center;gap:11px;padding:13px 16px;border-radius:12px;border:1px solid transparent;margin:14px 0;font-size:12px}.dm-notice b{display:inline-block;margin-right:12px;font-weight:650}.dm-notice span{line-height:1.6}.dm-orange{background:var(--dm-orange-soft);color:var(--dm-orange);border-color:#f5e2cc}.dm-blue{background:var(--dm-blue-soft);color:var(--dm-blue);border-color:#d9e7fa}.dm-red{background:var(--dm-red-soft);color:var(--dm-red);border-color:#f3d5d8}.dm-neutral{background:var(--dm-surface);color:var(--dm-text)}
.ph-demand-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0 16px}.dm-metric{border:1px solid var(--dm-border);border-radius:15px;padding:19px 18px;min-width:0;box-shadow:0 3px 16px #1d3c6007;display:flex;flex-direction:column;gap:8px}.dm-metric>span{font-size:11px;font-weight:600}.dm-metric>strong{font-size:24px;line-height:1.3;letter-spacing:-.6px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.ph-demand .dm-metric>small{margin:0;font-size:10px;line-height:1.5;color:var(--dm-muted)}.dm-facts{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px;font-size:11px}.dm-facts>span{padding:6px 10px;border:1px solid var(--dm-border);border-radius:8px}.dm-facts b{font-variant-numeric:tabular-nums;font-weight:700}
.dm-sheet{background:var(--dm-surface);border:1px solid var(--dm-border);border-radius:15px;margin:20px 0 0;box-shadow:0 3px 20px #19345106;overflow:visible}.dm-sheet-title{display:flex;gap:15px;justify-content:space-between;align-items:center;padding:17px 18px}.dm-sheet-title h3{font-size:16px;line-height:1.3;letter-spacing:-.2px;margin:0;color:var(--dm-text)}.dm-sheet-title>span{font-size:11px;color:var(--dm-muted)}.ph-demand-table{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#b5c9e1 #f1f5fa;min-width:0;border-radius:0 0 14px 14px}.ph-demand table{width:100%;min-width:1150px;border-collapse:separate;border-spacing:0;table-layout:auto;font-size:12px}.ph-demand th,.ph-demand td{padding:15px 12px;vertical-align:top;border-bottom:1px solid var(--dm-border);text-align:left}.ph-demand thead th{background:var(--dm-blue-soft);color:var(--dm-blue);font-weight:650;font-size:11px;line-height:1.45;padding:15px 12px;border-top:1px solid #e3edfa;white-space:normal}.ph-demand thead th:first-child{width:27%;min-width:265px}.ph-demand th.dm-col-number{text-align:right}.ph-demand th:last-child{text-align:left;width:135px}.ph-demand tbody tr:last-child td{border-bottom:0}.ph-demand tbody tr:hover{background:#f7faff}.ph-demand td.dm-number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.ph-demand td.dm-group-cell{min-width:265px;max-width:360px;overflow-wrap:anywhere}.dm-group-cell>strong{display:block;color:var(--dm-text);font-weight:650;font-size:12px}.dm-group-cell>span{display:block;margin-top:4px;font-size:12px;line-height:1.65;color:var(--dm-muted)}.ph-demand small{display:block;color:var(--dm-muted);font-size:10px;line-height:1.4;margin-top:5px}.ph-demand td.dm-cell-orange{color:var(--dm-orange);background:#fff8f1}.ph-demand td.dm-cell-red{color:var(--dm-red);background:#fff6f6}.dm-empty{color:#8495a8;font-size:10px;display:inline-block;white-space:normal;max-width:110px;line-height:1.5;font-weight:400}.dm-unit{display:inline-block;background:#edf3fa;color:var(--dm-blue);border:1px solid #d9e5f3;border-radius:6px;padding:3px 7px;font-size:10px;font-weight:650;white-space:nowrap}.dm-reason-cell{min-width:120px;max-width:180px;font-size:11px}.dm-reason{display:inline-block;border-radius:6px;padding:4px 7px;background:var(--dm-blue-soft);color:var(--dm-blue);margin-bottom:4px;line-height:1.4}.dm-reason.dm-unknown{background:#f2f5f8;color:var(--dm-muted)}.ph-demand .dm-no-data{text-align:center;padding:28px;color:var(--dm-muted)}
.ph-demand-pages{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:15px 4px;font-size:11px;color:var(--dm-muted)}.ph-demand-pages>div{display:flex;align-items:center;gap:15px}.ph-demand-pages b{color:var(--dm-text);font-variant-numeric:tabular-nums;white-space:nowrap}.ph-demand-pages button{font-size:11px;min-height:34px;padding:8px 12px}.dm-evidence{margin-top:9px;white-space:normal}.dm-evidence summary{cursor:pointer;color:var(--dm-blue);font-size:10px}.dm-evidence dl{display:grid;grid-template-columns:105px 1fr;gap:7px 10px;font-size:11px;background:#f6f9fd;border:1px solid var(--dm-border);padding:12px;border-radius:9px;margin:10px 0 0}.dm-evidence dt{font-weight:600;color:var(--dm-muted)}.dm-evidence dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.dm-method{border:1px solid var(--dm-border);border-radius:12px;background:#fff;padding:13px 16px;margin-top:20px;font-size:12px;color:var(--dm-muted)}.dm-method summary{cursor:pointer;font-weight:600;color:var(--dm-blue)}.dm-method p{line-height:1.8;margin:12px 0 0}
/* Floated header avoids overflow-x ancestors trapping native sticky; scroll stays on the page. */
.ph-demand .dm-sticky-head{position:fixed;z-index:24;overflow:hidden;background:var(--dm-blue-soft);box-shadow:0 5px 14px #23476c20;pointer-events:none;border-bottom:1px solid #bfd3eb}.ph-demand .dm-sticky-head[hidden]{display:none!important}.ph-demand .dm-sticky-head table{table-layout:fixed;min-width:0;margin:0;border-spacing:0}.ph-demand .dm-sticky-head thead th{min-width:0!important;max-width:none!important}.dm-sticky-head th small{color:var(--dm-muted)}
@media(max-width:1150px){.ph-demand-toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.dm-filter-actions{grid-column:span 1}.dm-metric>strong{font-size:20px}.ph-demand-metrics{gap:10px}.dm-metric{padding:16px 13px}}
@media(max-width:780px){.ph-demand{padding:10px 0 20px}.dm-heading{align-items:start;flex-direction:column;gap:16px}.dm-heading h2{font-size:24px}.dm-measure{align-self:stretch}.dm-measure button{flex:1}.ph-demand-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:13px}.ph-demand-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.dm-context{font-size:10px;gap:6px}.dm-notice{align-items:start}.dm-notice b{display:block;margin:0 0 4px}.dm-notice span{font-size:11px}.ph-demand-pages{flex-wrap:wrap}.ph-demand-pages>div{gap:10px}.dm-sheet-title{align-items:start;flex-direction:column;gap:5px}.dm-metric>strong{font-size:20px}.dm-facts{gap:6px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.ph-demand *{scroll-behavior:auto!important;transition:none!important}}
@media print{.dm-sticky-head,.ph-demand-toolbar,.dm-measure,.ph-demand-pages{display:none!important}.ph-demand-table{overflow:visible}.ph-demand table{min-width:0;font-size:9px}.ph-demand th,.ph-demand td{padding:7px}.ph-demand thead{display:table-header-group}.dm-method{break-inside:avoid}}

.ph-demand .dm-request-customers{display:grid;gap:12px;padding:16px;background:var(--dm-blue-soft,#eef5ff)}.ph-demand .dm-request-customers article{background:white;border:1px solid #dae5f1;border-radius:12px;padding:14px}.ph-demand .dm-request-customers p{margin:8px 0}.ph-demand .dm-request-note{font-size:12px;color:#637b93;line-height:1.6}.ph-demand tr[hidden]{display:none}

.ph-demand .dm-heading{justify-content:flex-end;margin-bottom:12px;padding:0}.ph-demand .dm-measure{margin:0}

.ph-demand .dm-metrics-omitted{display:none}.ph-topbar [data-dm-header-controls]{display:flex;margin:0;padding:0;align-items:center}.ph-topbar .dm-measure{background:#fff;border:1px solid #dae5f1;padding:3px;border-radius:10px}.ph-topbar .dm-measure button{font:600 12px Inter,system-ui,sans-serif;color:#285d9f;border:1px solid transparent;border-radius:7px;background:transparent;min-width:82px;padding:8px 12px;cursor:pointer}.ph-topbar .dm-measure button.active{background:#eef5ff;border-color:#d9e7fa}.ph-topbar:has([data-dm-header-controls]) .ph-top-actions input{max-width:180px}.ph-demand .dm-stock-request-sheet table{min-width:850px;table-layout:fixed}.ph-demand .dm-stock-request-sheet th:first-child{width:32%;min-width:0}.ph-demand .dm-stock-request-sheet th:nth-child(2){width:20%}.ph-demand .dm-stock-request-sheet th:nth-child(3){width:13%}.ph-demand .dm-stock-request-sheet th:nth-child(4){width:8%}.ph-demand .dm-stock-request-sheet th:nth-child(5),.ph-demand .dm-stock-request-sheet th:nth-child(6){width:8%}.ph-demand .dm-stock-request-sheet th:last-child{width:11%}.ph-demand .dm-stock-request-sheet th:nth-child(4),.ph-demand .dm-stock-request-sheet th:last-child,.ph-demand .dm-align-center{text-align:center}.ph-demand .dm-stock-request-sheet td:first-child{overflow-wrap:anywhere}.ph-demand .dm-stock-request-sheet td small{white-space:normal}.ph-demand .dm-stock-request-sheet th,.ph-demand .dm-stock-request-sheet td{padding:12px}.ph-demand .dm-stock-request-sheet button{padding:7px 12px;min-height:34px}.ph-demand{padding-top:4px}@media(max-width:780px){.ph-topbar:has([data-dm-header-controls]){flex-wrap:wrap;gap:8px}.ph-topbar [data-dm-header-controls]{margin-left:auto}.ph-topbar:has([data-dm-header-controls]) .ph-top-actions input{display:none}}

.ph-demand table{min-width:1350px}.ph-demand .dm-stock-request-sheet table{min-width:850px}

.ph-demand .dm-bottom-scroll{position:fixed;bottom:0;z-index:26;height:18px;overflow-x:scroll;overflow-y:hidden;background:#eef5ff;border-top:1px solid #bfd3eb;scrollbar-color:#8caecc #edf3fa}.ph-demand .dm-bottom-scroll>div{height:1px}.ph-demand .dm-bottom-scroll[hidden]{display:none!important}.ph-demand .dm-evidence .dm-request-customers{min-width:260px;max-width:640px}.ph-demand .dm-evidence summary{font-size:12px;font-weight:600;padding:7px 0}@media print{.dm-bottom-scroll{display:none!important}}

.ph-demand{max-width:none;width:100%}.ph-demand .dm-full-cell{padding:0!important;max-width:none!important}.ph-demand .dm-full-cell .dm-request-customers{min-width:0;max-width:none;width:100%;padding:18px}.ph-demand .dm-full-cell article{width:100%;max-width:none;font-size:13px;line-height:1.65}.ph-demand .dm-full-cell p{white-space:normal}.ph-demand .dm-fulfillment{padding:14px 18px;margin:14px 0;background:#eef5ff;border:1px solid #d9e7fa;border-radius:10px}.ph-demand .dm-fulfillment p{margin:7px 0}.ph-demand [data-dm-full]{display:block;margin-top:10px}

.ph-demand .dm-warehouse-detail{padding:12px 16px;background:#fff3e8;border:1px solid #f5e2cc;border-radius:10px;margin:12px 0}.ph-demand .dm-warehouse-detail p{margin:6px 0}.ph-demand .dm-warehouse-change{color:#865126}
