.wh-page { --wh-ink:#263445; --wh-rule:#e3e7ec; --wh-action:#2866b0; color:var(--wh-ink); padding:20px 0; }
/* Own stock is an operating ledger: the SKU and movement quantities lead. */
.wh-owned-page .wh-heading { align-items:center; }
.wh-owned-page .wh-heading h2 { font-size:22px; }
.wh-owned-page .wh-table-wrap { max-height:calc(100dvh - 340px); min-height:130px; }
.wh-owned-page .wh-table { min-width:960px; }
.wh-owned-page:not(.wh-owned-inventory) .wh-table { table-layout:fixed; white-space:normal; }
.wh-owned-page:not(.wh-owned-inventory) .wh-table th,.wh-owned-page:not(.wh-owned-inventory) .wh-table td { overflow-wrap:anywhere; padding:10px; }
.wh-owned-page:not(.wh-owned-inventory) .wh-table th:first-child,.wh-owned-page:not(.wh-owned-inventory) .wh-table td:first-child { white-space:nowrap; }
.wh-owned-page .wh-table th { font-size:14px; font-weight:650; color:var(--wh-ink); }
.wh-owned-page .wh-table th,.wh-owned-page .wh-table td { text-align:center; vertical-align:middle; border-right:1px solid var(--wh-rule); }
.wh-owned-page .wh-table td:first-child { font-weight:600; }
.wh-owned-page .wh-table td:last-child { border-right:0; }
.wh-owned-page .wh-inline { justify-content:center; gap:10px; }
.wh-owned-page .wh-owned-filters { align-items:flex-end; gap:10px; border-bottom:1px solid var(--wh-rule); padding:8px 0 14px; }
.wh-owned-filters > label { display:grid; gap:5px; color:#687587; font-size:12px; }
.wh-owned-filters > input[type=search] { flex:1 1 250px; max-width:350px; }
.wh-owned-filters > label input,.wh-owned-filters > label select { min-height:36px; padding:7px 10px; border:1px solid #d9e0e8; border-radius:5px; width:auto; }
.wh-owned-page .wh-kpis { margin:16px 0 12px; padding:14px 0; }
.wh-owned-page .wh-kpi strong { font-size:24px; }
.wh-owned-notes { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:12px 0; color:#687587; font-size:12px; }
.wh-owned-notes > span { flex:1; }
.wh-owned-page .wh-status { display:inline-block; padding:3px 8px; border-radius:4px; background:#f2f5f8; }
.wh-owned-page .wh-status.wh-low { background:#fff7e8; }
.wh-dialog { box-sizing:border-box; }
.wh-dialog form { max-height:70dvh; overflow:auto; padding:1px 2px; }
.wh-dialog form footer { position:sticky; bottom:0; background:#fff; padding:12px 0 1px; }
.wh-dialog form textarea[name=lines] { min-height:110px; font-variant-numeric:tabular-nums; }
@media(max-width:700px) {
  .wh-owned-page .wh-owned-filters > label { flex:1 1 42%; }
  .wh-owned-page .wh-owned-filters > label input,.wh-owned-page .wh-owned-filters > label select { width:100%; min-width:0; }
  .wh-owned-page .wh-owned-filters > input[type=search] { max-width:none; }
  .wh-owned-page .wh-table-wrap { max-height:62dvh; }
  .wh-owned-page .wh-heading .wh-actions { gap:7px; }
}
.wh-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.wh-heading h2 { margin:0 0 8px; font-size:24px; letter-spacing:-.4px; }
.wh-heading p,.wh-muted { color:#687587; font-size:13px; margin:0; line-height:1.7; }
.wh-actions,.wh-filters { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.wh-page button,.wh-dialog button { border-radius:6px; padding:8px 14px; font-size:13px; }
.wh-secondary { background:white!important; color:#35445b!important; border:1px solid #d9e0e8!important; }
.wh-link { background:none!important; border:0!important; color:var(--wh-action,#2866b0)!important; padding:3px 5px!important; text-align:left; }
.wh-banner { padding:10px 14px; background:#f5f8fc; border-left:3px solid #6485ac; color:#53677d; font-size:12px; line-height:1.7; margin-bottom:18px; }
.wh-warning { background:#fff8ec; border-color:#c59132; color:#775b2c; }
.wh-kpis { display:flex; gap:0; border:1px solid var(--wh-rule); border-radius:8px; margin:16px 0; padding:18px 0; background:#fff; }
.wh-kpi { flex:1; padding:0 22px; border-right:1px solid var(--wh-rule); }
.wh-kpi:last-child { border:0; }.wh-kpi span { display:block; font-size:12px; color:#748092; }
.wh-kpi strong { display:block; font-size:25px; margin-top:5px; font-variant-numeric:tabular-nums; font-weight:600; }
.wh-filters { padding:12px 0; }.wh-filters input { max-width:300px; }.wh-filters select { width:auto; min-width:120px; }
.wh-table-wrap { border:1px solid var(--wh-rule); border-radius:8px; overflow:auto; background:white; max-height:62vh; }
.wh-table { width:100%; border-collapse:collapse; white-space:nowrap; font-size:13px; }
.wh-table th { background:#f5f7fa; color:#687587; text-align:left; font-weight:500; position:sticky; top:0; z-index:1; }
.wh-table th,.wh-table td { padding:11px 14px; border-bottom:1px solid #edf0f3; }
.wh-table tbody tr:hover { background:#f7faff; }.wh-table .wh-number { text-align:right; font-variant-numeric:tabular-nums; }
.wh-status { font-size:12px; color:#687587; }.wh-low { color:#9c6b20; }.wh-error { color:#b43434; white-space:pre-wrap; font-size:13px; line-height:1.7; }
.wh-empty { padding:40px!important; text-align:center; color:#768295; }
.wh-dialog { border:1px solid #dce2e9; border-radius:10px; width:min(740px,calc(100vw - 32px)); max-height:88vh; padding:24px; color:#263445; }
.wh-dialog::backdrop { background:rgba(24,36,52,.32); }.wh-dialog h3 { margin:0 0 16px; font-size:20px; }
.wh-dialog form { display:grid; gap:14px; }.wh-dialog label { display:grid; gap:6px; font-size:13px; }
.wh-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.wh-dialog input,.wh-dialog select,.wh-dialog textarea { width:100%; padding:9px 10px; border:1px solid #d5dde6; border-radius:5px; font:inherit; box-sizing:border-box; }
.wh-dialog textarea { min-height:80px; }.wh-dialog footer { display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
.wh-inline { display:flex; gap:6px; }.wh-inline button { white-space:nowrap; }.wh-loading { padding:30px; }
@media(max-width:700px) { .wh-heading { flex-direction:column; }.wh-grid { grid-template-columns:1fr; }.wh-kpi { padding:0 10px; }.wh-kpi strong { font-size:20px; }.wh-page { padding:12px 0; }.wh-dialog { padding:16px; }.wh-heading h2 { font-size:21px; }.wh-table-wrap { max-height:65vh; } }
.wh-tabs { display:flex; gap:4px; flex-wrap:wrap; border-bottom:1px solid var(--wh-rule); margin:0 0 18px; padding-bottom:6px; }
.wh-tabs button { background:transparent; color:#53677d; border:0; border-radius:4px; }
.wh-tabs button[aria-selected="true"] { background:#eaf1fa; color:var(--wh-action); font-weight:600; }
.wh-check { display:flex; align-items:center; gap:6px; white-space:nowrap; font-size:13px; }
.wh-check input { width:16px; height:16px; margin:0; }
@media(max-width:700px) { .wh-kpis { flex-wrap:wrap; row-gap:14px; }.wh-kpi { flex:1 1 40%; }.wh-filters input[type="search"] { width:100%; max-width:none; }.wh-tabs button { padding:9px 10px; } }
/* Contain wide inventory tables within the ERP grid on narrow screens. */
.wh-page { min-width:0; width:100%; box-sizing:border-box; }
.wh-page.active { display:block; }
.wh-page > * { min-width:0; }
.wh-page .wh-muted,.wh-page .wh-banner { overflow-wrap:anywhere; }
.wh-filters select { max-width:100%; }

/* Text links share the same left edge as their column header. */
.wh-table .wh-link { padding-left:0!important; padding-right:0!important; }
.wh-table th,.wh-table td { vertical-align:middle; }
.wh-multi { position:relative; min-width:125px; }
.wh-multi > button { width:100%; text-align:left; padding-right:25px; }
.wh-multi > button::after { content:'▾'; position:absolute; right:10px; color:#748092; }
.wh-multi-panel { position:absolute; left:0; top:calc(100% + 6px); width:300px; max-width:calc(100vw - 40px); padding:12px; border:1px solid #d9e0e8; border-radius:8px; background:white; z-index:10; box-shadow:0 4px 12px #26344514; }
.wh-multi-panel[hidden] { display:none; }
.wh-multi-panel input[type=search] { width:100%; max-width:none; margin-bottom:8px; }
.wh-multi-options { max-height:245px; overflow:auto; margin-bottom:8px; }
.wh-multi-option { display:flex; align-items:center; gap:9px; padding:8px 4px; font-size:13px; cursor:pointer; }
.wh-multi-option:hover { background:#f5f8fc; }
.wh-multi-option input[type=checkbox] { flex:0 0 auto; width:15px; height:15px; margin:0; }
.wh-multi-option span { overflow-wrap:anywhere; min-width:0; }
.wh-dialog .wh-batch-dispatch .wh-multi-options { margin-top:8px; border:1px solid #e3e7ec; border-radius:6px; }
.wh-dialog .wh-batch-dispatch .wh-multi-option { display:flex; align-items:center; padding:8px 10px; }
.wh-dialog .wh-batch-dispatch .wh-multi-option input { width:16px; height:16px; padding:0; }
.wh-dialog .wh-batch-dispatch [role=status] { margin:8px 0 0; }
.wh-table .wh-merged-cell { background:#f8fafc; vertical-align:middle; border-right:1px solid #edf0f3; }
.wh-uncertain { display:inline-flex; flex-direction:column; align-items:flex-end; color:#7a6b52; }
.wh-uncertain small { font-size:11px; color:#77808d; margin-top:3px; }
.wh-stock-detail { width:min(1120px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); box-sizing:border-box; padding:20px; overflow:hidden; }
.wh-stock-detail[open] { display:flex; flex-direction:column; }
.wh-stock-detail { position:fixed; inset:0 0 0 auto; margin:0; width:min(820px,88vw); max-width:100vw; height:100dvh; max-height:100dvh; border-radius:12px 0 0 12px; padding:24px; }
.wh-stock-detail h3,.wh-stock-detail footer { flex-shrink:0; }
.wh-stock-detail footer { margin-top:auto; padding-top:12px; border-top:1px solid #e3e7ec; }
.wh-stock-detail .wh-table-wrap { min-height:0; max-height:none; margin-bottom:12px; overflow:auto; }
/* The ERP's global table minimum (940px) must not clip the modal's last column. */
.wh-stock-detail .wh-table { min-width:0; width:100%; table-layout:fixed; white-space:normal; }
.wh-stock-detail .wh-table th,.wh-stock-detail .wh-table td { padding:4px 10px; line-height:18px; overflow-wrap:anywhere; }
.wh-stock-detail .wh-table .wh-number { white-space:nowrap; }
@media(max-width:700px) {
  .wh-stock-detail { padding:12px; }
  .wh-stock-detail .wh-table { font-size:12px; }
  .wh-stock-detail .wh-table th,.wh-stock-detail .wh-table td { padding:4px; }
}
#warehousePlatformPage .wh-heading { margin-bottom:14px; }
#warehousePlatformPage .wh-filters { margin-bottom:12px; }
#warehousePlatformPage .wh-unified-filters { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
#warehousePlatformPage .wh-unified-filters .wh-multi { min-width:0; }
#warehousePlatformPage .wh-unified-filters > button { justify-self:start; }
#warehousePlatformPage .wh-unified-table .wh-table { min-width:1000px; }
#warehousePlatformPage .wh-unified-table { overflow:auto; max-height:calc(100dvh - 260px); }
#warehousePlatformPage .wh-unified-table td,#warehousePlatformPage .wh-unified-table th { padding:9px 10px; }
#warehousePlatformPage .wh-unified-table tbody tr:nth-child(even) { background:#f7f9fc; }
#warehousePlatformPage .wh-unified-table .wh-table th,#warehousePlatformPage .wh-unified-table .wh-table td { text-align:center; vertical-align:middle; border:1px solid #b9c7d6; }
#warehousePlatformPage .wh-unified-table .wh-table .wh-merged-cell { background:#fff; }
#warehousePlatformPage .wh-unified-table .wh-table th { font-size:15px; font-weight:700; color:#263445; }
#warehousePlatformPage .wh-unified-table .wh-uncertain { align-items:center; }
.wh-estimate { display:inline-flex; flex-direction:column; align-items:center; }
.wh-estimate small { margin-top:3px; font-size:11px; color:#687587; }
#warehousePlatformPage .wh-unified-table .wh-table .wh-short-code { white-space:nowrap; padding-left:6px; padding-right:6px; }
#warehousePlatformPage .wh-unified-table .wh-table .wh-white-cell { background:#fff; }
#warehousePlatformPage .wh-unified-table .wh-table .wh-family-emphasis { font-weight:600; }
#warehousePlatformPage .wh-unified-table.wh-warehouses-collapsed .wh-table { min-width:720px; }
#warehousePlatformPage .wh-warehouse-toggle { margin-left:8px; padding:4px 7px; font-size:12px; font-weight:500; vertical-align:middle; }
@media(max-width:700px) {
  #warehousePlatformPage .wh-unified-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #warehousePlatformPage .wh-unified-table { max-height:70dvh; }
}
#warehousePlatformPage .wh-heading { display:none; }
#warehousePlatformPage .wh-table-wrap { max-height:none; overflow:visible; }
#warehousePlatformPage .wh-table { min-width:0; table-layout:fixed; }
#warehousePlatformPage .wh-table th,#warehousePlatformPage .wh-table td { vertical-align:middle; padding:10px 14px; }
.wh-unified-groups { display:grid; gap:24px; width:100%; }
#warehousePlatformPage .wh-store-table th:nth-child(1) { width:15%; }
#warehousePlatformPage .wh-store-table th:nth-child(2) { width:21%; }
#warehousePlatformPage .wh-store-table th:last-child { width:12%; }
#warehousePlatformPage .wh-warehouse-table th:first-child { width:24%; }
#warehousePlatformPage .wh-warehouse-table th:nth-child(2) { width:11%; }
#warehousePlatformPage .wh-table td { overflow-wrap:anywhere; white-space:normal; }
#warehousePlatformPage .wh-table .wh-number { white-space:nowrap; }
#warehousePlatformPage .wh-table .wh-merged-cell { background:inherit; }
#warehousePlatformPage .wh-group-start td { border-top:1px solid #d5dfe9; }
#warehousePlatformPage .wh-group-tint { background:#f6f8fb; }
@media(max-width:700px) {
  .wh-stock-detail { width:100vw; max-width:100vw; border-radius:0; }
  #warehousePlatformPage .wh-table { min-width:650px; }
  #warehousePlatformPage .wh-table-wrap { overflow:auto; }
}
.wh-store-groups { max-width:1040px; display:grid; gap:20px; }
.wh-platform-group h3 { margin:0 0 10px; font-size:16px; font-weight:600; color:#35445b; }
.wh-platform-group .wh-table-wrap { max-height:none; }
.wh-platform-group .wh-table { min-width:0; table-layout:fixed; }
.wh-platform-group .wh-table th,.wh-platform-group .wh-table td { vertical-align:middle; padding:9px 16px; }
.wh-platform-group .wh-table th:first-child { width:34%; }
.wh-platform-group .wh-store-heading td { padding:0 16px; background:#edf2f7; border-top:1px solid #dce4ed; border-bottom:1px solid #dce4ed; }
.wh-store-bar { min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.wh-store-bar strong { font-size:13px; font-weight:600; }
@media(max-width:700px) {
  .wh-platform-group .wh-table { font-size:12px; white-space:normal; }
  .wh-platform-group .wh-table th,.wh-platform-group .wh-table td { padding:8px; overflow-wrap:anywhere; }
}
@media(max-width:700px) { .wh-multi { flex:1 1 130px; }.wh-multi-panel { position:fixed; left:16px; right:16px; top:20vh; width:auto; max-width:none; }.wh-multi-options { max-height:40vh; } }
.wh-refresh-info { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 0; color:#596579; font-size:13px; }
.wh-refresh-info small { color:#7b8494; }
.wh-refresh-info .wh-coverage { color:#34475f; font-variant-numeric:tabular-nums; }
#warehousePlatformPage .wh-health-badge { display:block; margin-top:4px; padding:2px 5px; border:1px solid #dfc787; background:#fff9ec; color:#785a1b; font-size:11px; font-weight:400; line-height:1.5; white-space:normal; }
#warehousePlatformPage .wh-health-expired { border-color:#dcb1a7; background:#fff5f2; color:#91432f; }
#warehousePlatformPage .wh-health-unknown { border-color:#d4dbe4; background:#f3f5f8; color:#596579; }
#warehousePlatformPage .wh-health-badge:hover { filter:brightness(.97); }
#warehousePlatformPage .wh-health-badge:focus-visible { outline:2px solid #2866b0; outline-offset:2px; }
.wh-health-details { max-height:50dvh; overflow:auto; }
.wh-health-details p { margin:0; padding:12px 0; border-bottom:1px solid #e6eaf0; font-size:13px; line-height:1.8; overflow-wrap:anywhere; }
#warehousePlatformPage .wh-unified-table .wh-table { min-width:1180px; }
#warehousePlatformPage .wh-unified-table.wh-warehouses-collapsed .wh-table { min-width:850px; }
.wh-source-results { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.wh-source-results .wh-table-wrap { flex:1; min-height:0; overflow:auto; }
.wh-source-results > p { flex-shrink:0; margin:0 0 8px; }
/* Own warehouse: SKU-led operating tables and explicit business states. */
#warehouseInboundPage .wh-table { min-width:2200px; }
.wh-owned-page .wh-owned-filters > label input { width:100%; min-width:0; }
.wh-stock-total { display:flex; align-items:center; gap:0; margin:12px 0; padding:14px 18px; border:1px solid var(--wh-rule); border-radius:6px; background:white; }
.wh-stock-total span { font-size:14px; color:#596579; }.wh-stock-total strong { font-size:25px; font-variant-numeric:tabular-nums; }
.wh-owned-page .wh-status.wh-state-green { background:#eaf6ee; color:#23713d; }
.wh-owned-page .wh-status.wh-state-red { background:#fbecec; color:#af3030; }
.wh-owned-page .wh-status.wh-state-yellow { background:#fff5d9; color:#8a640f; }
.wh-owned-page .wh-status.wh-state-blue { background:#eaf2ff; color:#285fa6; }
.wh-owned-inventory .wh-table td:first-child,#warehouseInboundPage .wh-table td:first-child { position:sticky; left:0; background:#fff; z-index:2; }
.wh-owned-inventory .wh-table th:first-child,#warehouseInboundPage .wh-table th:first-child { position:sticky; left:0; z-index:3; }

/* Physical label colour always has a readable name and a bordered swatch. */
.wh-label-color { display:inline-flex; align-items:center; justify-content:center; gap:7px; white-space:nowrap; }
.wh-color-swatch { display:inline-block; width:15px; height:15px; flex:0 0 15px; border:1px solid #b8c0ca; border-radius:3px; box-sizing:border-box; }
.wh-color-unknown { background:repeating-linear-gradient(135deg,#fff 0 4px,#e3e7ec 4px 5px); }
.wh-color-preview { display:flex; align-items:center; min-height:22px; color:#53677d; font-size:12px; }

/* Keep overview filters compact and ordered like the platform warehouse toolbar. */
.wh-owned-inventory .wh-owned-filters { justify-content:flex-start; gap:8px; }
.wh-owned-inventory .wh-owned-filters > label.wh-owned-zero-toggle { display:inline-flex; flex:0 0 auto; width:auto; align-items:center; gap:6px; min-height:36px; margin:0; padding:0; cursor:pointer; font-size:13px; color:#53677d; }
.wh-owned-inventory .wh-owned-filters > label.wh-owned-zero-toggle input { width:16px; min-height:16px; height:16px; margin:0; padding:0; cursor:pointer; }
.wh-stock-statuses { display:inline-flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:5px; }
.wh-owned-inventory .wh-table th:last-child,.wh-owned-inventory .wh-table td:last-child { min-width:115px; }

/* Reuse platform warehouse picker chrome; keep own-stock filters left aligned. */
.wh-owned-inventory .wh-owned-filters { align-items:center; }
.wh-owned-inventory .wh-owned-filters > .wh-multi { flex:0 0 140px; width:140px; min-width:0; }
.wh-owned-inventory .wh-owned-filters > .wh-multi:first-child { flex-basis:165px; width:165px; }

/* Freeze column proportions and row height, while keeping the original full width. */
.wh-owned-inventory .wh-table { table-layout:fixed; width:100%; min-width:1330px; max-width:none; }
.wh-owned-inventory .wh-table th { height:44px; box-sizing:border-box; padding:0 14px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.wh-owned-inventory .wh-table td { height:61px; box-sizing:border-box; padding:0 14px; overflow:hidden; white-space:nowrap; }
.wh-owned-inventory .wh-stock-cell { height:60px; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.wh-owned-inventory .wh-stock-cell > span { display:block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:20px; }
.wh-owned-inventory .wh-stock-cell .wh-link { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.wh-owned-inventory .wh-stock-statuses { flex-wrap:nowrap; vertical-align:middle; }
.wh-owned-inventory .wh-label-color { vertical-align:middle; }
.wh-owned-inventory .wh-table .wh-empty { padding:0 14px!important; }

/* Physical stock and pending inbound are separate quantities, never one balance. */
.wh-stock-metric { display:flex; align-items:baseline; gap:16px; white-space:nowrap; }
.wh-stock-metric.wh-stock-transit { margin-left:28px; padding-left:28px; border-left:1px solid #d9e0e8; }
@media(max-width:700px) {
  .wh-stock-total { flex-direction:column; align-items:stretch; gap:10px; }
  .wh-stock-metric { justify-content:space-between; gap:12px; }
  .wh-stock-metric.wh-stock-transit { margin-left:0; padding:10px 0 0; border-left:0; border-top:1px solid #e3e7ec; }
}

/* Registration uses the same compact picker controls as the inventory overview. */
.wh-owned-page .wh-owned-filters { justify-content:flex-start; align-items:center; gap:8px; }
.wh-owned-page .wh-owned-filters > .wh-multi { flex:0 0 140px; width:140px; min-width:0; }
.wh-owned-page .wh-owned-filters > .wh-multi:first-child { flex-basis:165px; width:165px; }
.wh-owned-page .wh-owned-filters > input[type=search] { flex:0 1 245px; min-width:160px; height:36px; padding:7px 10px; border:1px solid #d9e0e8; border-radius:5px; background:#fff; }
.wh-owned-page .wh-owned-filters > .wh-date-filter { display:flex; flex:0 0 auto; align-items:center; gap:7px; }
.wh-owned-page .wh-owned-filters > .wh-date-filter input { width:145px; min-width:0; }
.wh-filter-chips { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.wh-filter-chips button { font-size:12px; padding:5px 8px; }
#warehouseInboundPage .wh-inbound-table { overflow-x:hidden; overflow-y:auto; }
#warehouseInboundPage .wh-inbound-scroll { appearance:none; display:block; position:sticky; bottom:0; z-index:4; width:100%; height:16px; min-height:0; box-sizing:border-box; padding:3px; margin:0; background:#eef1f5; border:0; border-radius:8px; cursor:pointer; }
#warehouseInboundPage .wh-inbound-scroll[hidden] { display:none; }
#warehouseInboundPage .wh-inbound-scroll::-webkit-slider-thumb { appearance:none; width:var(--thumb-width,20%); height:10px; border-radius:6px; background:#8794a5; }
#warehouseInboundPage .wh-inbound-scroll::-moz-range-thumb { width:var(--thumb-width,20%); height:10px; border:0; border-radius:6px; background:#8794a5; }
#warehouseInboundPage .wh-inbound-table .wh-table { min-width:0; table-layout:fixed; }
#warehouseInboundPage .wh-inbound-table .wh-table th { white-space:nowrap; }
#warehouseInboundPage .wh-inbound-table .wh-table td { height:61px; box-sizing:border-box; }
#warehouseInboundPage .wh-inbound-table .wh-table td.wh-merged-shipment { vertical-align:middle; }
#warehouseInboundPage .wh-inbound-table .wh-register-cell { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#warehouseInboundPage .wh-inbound-table .wh-inbound-maintenance { position:sticky; right:0; background:#fff; z-index:2; border-left:1px solid #c7d2df; box-shadow:-5px 0 7px -7px #687587; }
#warehouseInboundPage .wh-inbound-table th.wh-inbound-maintenance { background:#f5f7fa; z-index:3; }
#warehouseInboundPage .wh-inbound-table td:last-child:not(.wh-inbound-maintenance):not(.wh-empty) { border-right:1px solid var(--wh-rule); }
#warehouseInboundPage .wh-inbound-table td:first-child { border-right:1px solid #c7d2df; }
#warehouseInboundPage .wh-inbound-table .wh-inline { flex-wrap:wrap; gap:4px 12px; }
.wh-shipment-maintenance .wh-inline { flex-wrap:wrap; gap:4px 10px; }
.wh-shipment-maintenance .wh-table th:last-child { width:42%; }
.wh-dialog:has(.wh-form-section) { width:min(940px,calc(100vw - 32px)); }
.wh-form-section { min-width:0; padding:0 0 16px; border-bottom:1px solid #e3e7ec; }
.wh-form-section h4 { margin:0 0 12px; font-size:14px; color:#35445b; }
.wh-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; align-items:start; }
.wh-form-grid > * { min-width:0; }
.wh-field-wide { grid-column:1 / -1; }
.wh-required { color:#b43434; font-size:12px; margin-left:3px; }
.wh-dialog input[readonly] { background:#f5f7fa; color:#687587; }
.wh-outbound-lines { display:grid; gap:8px; margin-bottom:10px; }
.wh-outbound-entry { display:grid; grid-template-columns:minmax(0,1fr) 130px auto; gap:8px; align-items:center; }
.wh-outbound-entry button { padding:8px 10px; }
.wh-paste-lines { margin:12px 0; font-size:13px; }
.wh-paste-lines summary { cursor:pointer; color:#2866b0; margin-bottom:8px; }
.wh-paste-lines textarea { margin-bottom:8px; }
.wh-outbound-preview { margin-top:12px; }
.wh-outbound-preview .wh-table { min-width:0; table-layout:fixed; white-space:normal; }
.wh-outbound-preview .wh-table th,.wh-outbound-preview .wh-table td { padding:8px; text-align:center; overflow-wrap:anywhere; }
.wh-outbound-preview .wh-table th:first-child { width:38%; }
.wh-correction-summary { margin:0 0 12px; padding:10px 12px; background:#f5f7fa; font-size:13px; line-height:1.7; }
.wh-dialog .wh-correction-history { margin:12px 0; }
.wh-dialog .wh-correction-history summary { cursor:pointer; font-size:13px; color:#2866b0; }
@media(max-width:700px) {
  .wh-form-grid { grid-template-columns:1fr; gap:12px; }
  .wh-outbound-entry { grid-template-columns:minmax(0,1fr) 85px auto; gap:5px; }
  .wh-outbound-entry button { padding:8px 6px; }
  .wh-owned-page .wh-owned-filters > .wh-date-filter input { width:132px; }
  #warehouseInboundPage .wh-inbound-table .wh-inbound-maintenance { position:static; }
}

/* Keep unsaved-work confirmation inside the form, including embedded browsers. */
.wh-dialog .wh-dismiss-notice { padding:12px 14px; border:1px solid #e7cc88; border-radius:6px; background:#fff9eb; color:#735618; }
.wh-dialog .wh-dismiss-notice[hidden] { display:none; }
.wh-dismiss-notice p { margin:0 0 10px; font-size:13px; line-height:1.6; }
.wh-dismiss-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.wh-dismiss-actions button:last-child { color:#a13d2d; }
.wh-color-picker { position:relative; }
.wh-color-picker > summary { display:flex; align-items:center; justify-content:space-between; gap:8px; list-style:none; cursor:pointer; padding:9px 12px; border:1px solid #ccd3db; border-radius:6px; background:white; }
.wh-color-picker > summary::-webkit-details-marker { display:none; }
.wh-color-picker > summary::after { content:""; flex:none; width:7px; height:7px; border:solid #667485; border-width:0 1.5px 1.5px 0; transform:translateY(-2px) rotate(45deg); }
.wh-color-picker[open] > summary::after { transform:translateY(2px) rotate(225deg); }
.wh-color-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; padding:8px; border:1px solid #d9dfe6; border-radius:6px; }
.wh-dialog .wh-color-list label { display:flex; align-items:center; gap:6px; cursor:pointer; }
.wh-dialog .wh-color-list input { width:16px; min-height:16px; height:16px; }
.wh-form-grid > [hidden] { display:none; }
/* Stocktake requests stay separate from posted inventory movements. */
.wh-approval-section { margin: 16px 0 28px; }
.wh-approval-section .wh-heading { align-items: center; gap: 16px; flex-wrap: wrap; }
.wh-approval-section .wh-heading h3 { margin: 0 0 8px; }
.wh-approval-section .wh-heading label { display: flex; align-items: center; gap: 8px; }
.wh-approval-section .wh-table-wrap { max-height: 340px; overflow: auto; }
.wh-approval-section td:nth-child(3) { max-width: 360px; overflow-wrap: anywhere; white-space: normal; }
.wh-stock-detail.wh-stocktake-detail { inset: 0; margin: auto; width: min(820px,calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); border-radius: 10px; overflow: auto; }
.wh-stocktake-detail .wh-table-wrap { max-height: 42dvh; flex-shrink: 0; margin: 12px 0; }
.wh-stocktake-detail p { overflow-wrap: anywhere; }
.wh-stocktake-review .wh-table { min-width: 0; width: 100%; table-layout: fixed; white-space: normal; }
.wh-stocktake-detail .wh-table th,.wh-stocktake-detail .wh-table td,
.wh-stocktake-review .wh-table th,.wh-stocktake-review .wh-table td { text-align: center; vertical-align: middle; padding: 10px 8px; overflow-wrap: anywhere; }
.wh-stocktake-detail footer { position: sticky; bottom: 0; background: white; flex-wrap: wrap; }
