/* Shipping Center: one stable navigation row across all four views. */
.lm-head-actions { display: contents; }
html.wf-ship-on #page-locations .lm-head {
  display: flex; flex-direction: column; align-items: stretch; gap: 16px;
  margin-bottom: 16px;
}
html.wf-ship-on #page-locations .lm-head-t { min-width: 0; }
html.wf-ship-on #page-locations .lm-head-side {
  display: flex; flex-direction: row; justify-content: space-between;
  align-items: center; flex-wrap: nowrap; width: 100%; min-width: 0; gap: 12px;
}
html.wf-ship-on #page-locations .lm-tabs { flex: 0 1 auto; min-width: 0; }
html.wf-ship-on #page-locations .lm-head-actions {
  display: flex; justify-content: flex-end; align-items: center; flex: 0 0 150px;
  min-height: 40px;
}
html.wf-ship-on #page-locations .lm-title { font-size: clamp(26px, 2.8vw, 34px); }
html.wf-ship-on #page-locations .lm-sub { line-height: 1.4; }
html.wf-ship-on #page-locations .lm-toolbar { align-items: center; }
html.wf-ship-on #page-locations .lm-stock-note { flex: 0 1 360px; font-size: 12px; line-height: 1.4; }
html.wf-ship-on #page-locations .lm-legend { flex-wrap: wrap; }
/* Break cards by available space; rail sizing must never stretch a card's text. */
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) {
  display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)) !important;
  gap: 12px; margin: 0 0 16px; padding: 0 !important;
  overflow: visible !important; scroll-snap-type: none !important;
}
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) > .pay-kpi {
  width: auto !important; min-width: 0 !important; max-width: none !important;
  min-height: 90px !important; flex: none !important; box-sizing: border-box;
  padding: 12px 14px; overflow: hidden; grid-column: auto !important;
}
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .pay-kpi-label {
  white-space: normal !important; overflow-wrap: anywhere; font-size: 10.5px; line-height: 1.3; letter-spacing: .8px;
}
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .pay-kpi-value {
  font-size: 24px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .pay-kpi-footer {
  display: block !important; margin-top: 2px;
}
html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .pay-kpi-sub {
  display: block !important; white-space: normal !important; font-size: 11.5px; line-height: 1.35;
}
html.wf-ship-on #page-locations :is(.lm-kpis, #ip-kpis) + .wf-kpi-rail-dots,
html.wf-ship-on #page-locations :is(.lm-kpis, #ip-kpis) ~ .wf-kpi-progress { display: none !important; }
@media (max-width: 768px) {
  html.wf-ship-on #page-locations .lm-head { gap: 12px; }
  html.wf-ship-on #page-locations .lm-head-actions { display: none; }
  html.wf-ship-on #page-locations .lm-tabs { width: 100%; flex: 1 1 auto; }
  html.wf-ship-on #page-locations .lm-sub { font-size: 12px; }
  html.wf-ship-on #page-locations .lm-stock-note { flex-basis: 100%; }
  html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px;
  }
  html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) > .pay-kpi {
    min-height: 96px !important; padding: 12px; grid-template-columns: minmax(0, 1fr) !important;
  }
  html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) > .pay-kpi:last-child:nth-child(odd) { grid-column: 1 / -1 !important; }
  html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .wf-kpi-ic { display: none; }
  html.wf-ship-on #page-locations:has(#lm-tab-incoming.ipk-on) :is(.lm-kpis.wf-kpi-thin, #ip-kpis) .pay-kpi-value { font-size: 22px; }
}
/* Ship-to availability controls remain accessible even when every address is off. */
html.wf-ship-on #page-locations .lm-address-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 13px; color: var(--off-white); }
html.wf-ship-on #page-locations .lm-address-tools[hidden] { display: none; }
.lm-address-manager > p { color: var(--off-white); font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.lm-address-manager > .search-input { width: 100%; box-sizing: border-box; }
#lm-address-list { margin-top: 12px; }
#lm-address-error { color: var(--red); font-size: 13px; margin-top: 10px; }
#lm-address-error:empty { display: none; }
.lm-address-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.lm-address-info { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.lm-address-info > div { color: var(--off-white); line-height: 1.4; margin: 4px 0 8px; }
.lm-address-state { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.lm-address-state.is-on { color: var(--green); background: var(--green-dim); }
.lm-address-state.is-off { color: var(--red); background: var(--red-dim); }
.lm-address-assigned { margin-left: 8px; color: var(--off-white); font-size: 12px; }
.lm-address-row > button { flex: 0 0 auto; min-width: 80px; min-height: 44px; }
@media (max-width: 600px) {
  html.wf-ship-on #page-locations .lm-address-tools { align-items: flex-start; flex-direction: column; }
  html.wf-ship-on #page-locations #lm-manage-addresses { min-height: 44px; }
}
