/* 151 Weekly Order only; no global layout overrides. */
#supplierWeeklyTabPanel{background:#fff;border:1px solid #dedede;border-radius:12px;overflow:hidden;color:#182230}
#supplierWeeklyTabPanel *{box-sizing:border-box}
#w151App{padding:18px;max-width:100%}
#w151App h3{margin:0;font-size:19px}#w151App p{margin:7px 0;color:#64748b;font-size:12px;line-height:1.5}
.w151-heading{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;margin-bottom:14px}.w151-week{white-space:nowrap;border:1px solid #e2cd9e;color:#755723;background:#fff9ec;padding:9px 12px;border-radius:20px;font-size:12px;font-weight:700}
.w151-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:9px;padding:14px;border:1px solid #e4d2ac;background:#fffbf2;border-radius:10px}
#w151App button,#w151App .w151-file{border:1px solid #b48d44;background:#1d1d1d;color:#f5d483;padding:10px 13px;border-radius:7px;cursor:pointer;font:700 12px/1.3 Arial,sans-serif;min-height:38px}
#w151App button.secondary{background:#fff;color:#526070;border-color:#d5dae0}#w151App button:disabled{opacity:.45;cursor:not-allowed}#w151App button:focus-visible,#w151App input:focus-visible,#w151App select:focus-visible{outline:3px solid #d4a738;outline-offset:2px}
#w151App .w151-file input{display:none}#w151App label.w151-days{display:grid;gap:4px;color:#555;font-size:11px;font-weight:700}#w151App input,#w151App select{border:1px solid #cdd4dc;border-radius:6px;padding:9px 10px;font:12px Arial,sans-serif;min-height:36px;background:#fff;color:#1c2635}#w151Days{width:88px}
#w151Source{font-size:12px;font-weight:700;margin-top:11px;overflow-wrap:anywhere}#w151SourceHint,#w151Save{font-size:11px;color:#64748b;margin-top:5px}
#w151Status{margin:14px 0 10px;padding:11px 13px;font-size:12px;line-height:1.5;border-radius:7px;background:#edf2f7;color:#3a4d62}#w151Status[data-state=ready]{background:#edf7ee;color:#276841}#w151Status[data-state=warning]{background:#fff3d9;color:#725415}#w151Status[data-state=error]{background:#fff0ef;color:#a52b26}
.w151-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0 7px}.w151-kpis>div{border:1px solid #e3e5e9;border-radius:10px;padding:14px 15px;background:#fafbfc}.w151-kpis span{display:block;color:#697386;font-size:10px;text-transform:uppercase;letter-spacing:.05em}.w151-kpis b{display:block;margin-top:6px;font-size:23px;font-variant-numeric:tabular-nums}.w151-kpis>div:last-child{background:#fff9ec;border-color:#dfc58d}
#w151Packing{font-size:11px;color:#64748b;margin:7px 0 15px}.w151-scroll{max-width:100%;overflow:auto;border:1px solid #e0e3e7;border-radius:8px;max-height:540px;overscroll-behavior:contain}
#w151App table{width:100%;border-collapse:collapse;table-layout:auto;min-width:860px;font:12px/1.35 Arial,sans-serif;background:#fff}#w151App th{background:#252525;color:#fff;font-size:11px;position:sticky;top:0;z-index:1;text-align:left;padding:11px 10px;white-space:nowrap}#w151App td{padding:11px 10px;border-bottom:1px solid #e6e9ee;vertical-align:middle}#w151App tbody tr:nth-child(even){background:#fafafa}#w151App .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}#w151App .w-code{font-weight:700;white-space:nowrap}#w151App .w-desc{min-width:260px}#w151App .w-total{font-weight:700}#w151App td small{display:block;font-size:10px;margin-top:4px;color:#697386}
#w151Empty{padding:32px 20px;text-align:center;color:#758195;font-size:13px;border:1px solid #e6e8ec;border-radius:8px}#w151App details{border:1px solid #dfe3e8;border-radius:9px;margin-top:15px;background:#fff}#w151App summary{padding:14px;cursor:pointer;font-size:13px;font-weight:700}#w151ReviewCount{font-size:11px;font-weight:400;margin-left:9px;color:#697386}.w151-review-tools{padding:0 13px 12px;display:flex;gap:8px;flex-wrap:wrap}#w151Search{flex:1;min-width:160px}.w151-audit-wrap{margin:0 12px 12px}#w151Audit{min-width:1300px;font-size:11px!important}#w151Audit .w-reason{min-width:290px;max-width:440px}
.w151-tag{display:inline-block;padding:4px 7px;border-radius:14px;font-size:10px;font-weight:700;white-space:nowrap;background:#ecf0f5;color:#556274}.w151-tag.order{background:#e5f3e7;color:#287344}.w151-tag.review{background:#fde9e7;color:#a12d27}.w151-tag.defer{background:#fff2cf;color:#8c6311}
#w151ReviewWarning{margin:10px 0;padding:9px 12px;border-left:3px solid #daae48;background:#fff9eb;font-size:12px;color:#74561b;line-height:1.5}.w151-formula-copy{padding:0 16px 14px;font:12px/1.6 Arial,sans-serif;color:#4a586a}.w151-formula-copy code{background:#f0f2f5;padding:2px 4px;white-space:normal}.w151-formula-copy p{margin:9px 0!important;color:#4a586a!important}
@media(max-width:700px){#w151App{padding:12px}.w151-heading{flex-direction:column}#w151App h3{font-size:17px}.w151-tools{padding:11px;gap:8px}#w151App .w151-tools button,#w151App .w151-file{flex:1 1 42%;text-align:center}#w151App .w151-tools .w151-days{flex:1 1 38%}#w151Days{width:100%}.w151-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.w151-kpis b{font-size:22px}.w151-kpis>div{padding:12px}#w151ReviewCount{display:block;margin:5px 0 0}#w151App th,#w151App td{padding:10px 8px}.w151-scroll{max-height:450px}.w151-week{font-size:11px}}

/* v2: automatic source, scoped export controls. */
#w151App .w151-auto{display:inline-flex;align-items:center;padding:9px 12px;border-radius:20px;background:#e9f5eb;color:#266840;font-size:12px;font-weight:700;margin-right:auto;line-height:1.35}
#w151App .w151-tools{align-items:center}
@media(max-width:700px){#w151App .w151-auto{width:100%;justify-content:center;margin:0}#w151App .w151-tools button{flex:1 1 42%}}

#w151App .w151-mobile-hint{display:none}@media(max-width:700px){#w151App .w151-mobile-hint{display:block;font-size:11px;color:#64748b;margin:8px 0}}


/* 2026-10-18 · 151 Weekly Order clean view.
   All IDs / hidden sections are retained for calculations, cloud snapshots,
   staff decision state and error reporting. Only presentation is simplified. */
#w151App .w151-heading p,
#w151App .w151-auto,
#w151App #w151Source,
#w151App #w151SourceHint,
#w151App #w151Save,
#w151App #w151CloudCount,
#w151App #w151HistorySync,
#w151App #w151ValueBreakdown,
#w151App #w151Packing,
#w151App #w151ReviewWarning,
#w151App #w151RecommendationNote,
#w151App .w151-mobile-hint,
#w151App #w151ReviewAll,
#w151App #w151HistoryPanel,
#w151App .w151-technical-rules {
  display: none !important;
}
/* The background status engine continues to run; actual failures remain visible. */
#w151App #w151Status { display: none !important; }
#w151App #w151Status[data-state="error"] { display: block !important; }
/* Staff controls are accessible only when explicitly requested. */
#w151App #w151StockUnitRow,
#w151App #w151Review { display: none !important; }
#w151App.w151-manage-open #w151Review { display: block !important; }
#w151App.w151-manage-open #w151StockUnitRow:not([hidden]) { display: flex !important; }
/* Give the main order table more immediate prominence. */
#w151App .w151-heading { align-items: center; margin-bottom: 10px; }
#w151App .w151-tools { justify-content: flex-end; padding: 9px 11px; }
#w151App .w151-kpis { margin: 12px 0 15px; }
#w151App #w151ReviewOpen[aria-expanded="true"] { background: #fff8e9; border-color: #b48d44; color: #76541c; }
@media (max-width:700px) {
  #w151App .w151-tools { gap: 6px; }
  #w151App .w151-tools button { flex: 1 1 32%; }
  #w151App .w151-kpis { margin-top: 10px; }
}

/* 151 Weekly Order: one VERTICAL scrolling surface (main page only).
   This intentionally removes the nested table-height limit, while keeping
   mobile HORIZONTAL column scrolling and all existing calculations untouched. */
#supplierWeeklyTabPanel #w151App .w151-scroll {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  overscroll-behavior-y: auto !important;
}
@media (max-width: 700px) {
  #supplierWeeklyTabPanel #w151App .w151-scroll {
    overflow-x: auto !important;
    max-height: none !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* 19 October 2026 - pallet notes and stock requests appear ONLY in supplier exports.
   Weekly Order recommendation table keeps its original six buying columns. */
#supplierWeeklyTabPanel #w151ReadyTable{min-width:860px}

