/* Shipping Center -> Addresses (runners per address, per store; 2026-10-22). New UI: thin wf-kpi-thin cards, Invoices-style rows,
   pill status, 44px taps, theme tokens only (day + night). Scoped to #lm-addr-view / #rla-sheet / .rla-panel. */
#lm-addr-view, #rla-sheet, .rla-panel, #modal-runner-setup { --rla-red: #c0392b; --rla-amber: #b7791f; --rla-green: #1f8a4c; --rla-grey: #7a8494; }
html[data-remodel-mode="night"] #lm-addr-view, html[data-remodel-mode="night"] #rla-sheet, html[data-remodel-mode="night"] .rla-panel, html[data-remodel-mode="night"] #modal-runner-setup { --rla-red: #ef6b5c; --rla-amber: #e0a33a; --rla-green: #4cc282; --rla-grey: #9aa3b2; }
#lm-addr-view[hidden], #rla-sheet[hidden], #lm-tab-addresses[hidden], .rla-sheet-wrap[hidden] { display: none !important; }
[data-tone="red"] { --rla-tone: var(--rla-red); } [data-tone="amber"] { --rla-tone: var(--rla-amber); } [data-tone="green"] { --rla-tone: var(--rla-green); } [data-tone="grey"] { --rla-tone: var(--rla-grey); }

#lm-addr-view { display: block; padding-bottom: 32px; }
.rla-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.rla-head .rla-sub { margin: 0; font-size: 14px; flex: 1 1 auto; min-width: 0; }
.rla-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.rla-title { margin: 2px 0 0; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--white); }
.rla-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.rla-head .btn { min-height: 44px; flex: 0 0 auto; }

html body #lm-addr-view .wf-kpi-rail.rla-kpis { display: flex; margin: 0 0 12px; }
@media (min-width: 601px) {
  html body #lm-addr-view .wf-kpi-rail.rla-kpis { --wf-kpi-cap: none; --wf-kpi-basis: 0px; }
  html body #lm-addr-view .wf-kpi-rail.rla-kpis > .pay-kpi { flex: 1 1 0 !important; max-width: none !important; min-width: 0; }
  html body #lm-addr-view .wf-kpi-railwrap:has(> .rla-kpis) .wf-kpi-progress { display: none; }
}
html body #lm-addr-view .rla-kpis .pay-kpi { cursor: pointer; }
html body #lm-addr-view .rla-kpis .pay-kpi.is-on { border-color: var(--gold); }
html body #lm-addr-view .rla-kpis .pay-kpi:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
html body #lm-addr-view .wf-kpi-rail.rla-kpis .pay-kpi-footer, html body #lm-addr-view .wf-kpi-rail.rla-kpis .pay-kpi-sub { white-space: normal !important; overflow-wrap: anywhere; text-overflow: clip; }
html body #lm-addr-view .rla-k-full .pay-kpi-value { color: var(--rla-red); }
html body #lm-addr-view .rla-k-almost .pay-kpi-value { color: var(--rla-amber); }
html body #lm-addr-view .rla-k-open .pay-kpi-value { color: var(--rla-green); }
html body #lm-addr-view .rla-k-full .wf-kpi-ic { color: var(--rla-red); background: color-mix(in srgb, var(--rla-red) 14%, transparent); }
html body #lm-addr-view .rla-k-almost .wf-kpi-ic { color: var(--rla-amber); background: color-mix(in srgb, var(--rla-amber) 14%, transparent); }
html body #lm-addr-view .rla-k-open .wf-kpi-ic { color: var(--rla-green); background: color-mix(in srgb, var(--rla-green) 14%, transparent); }

.rla-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.rla-lg { display: inline-flex; align-items: center; gap: 6px; color: var(--white); font-weight: 600; }
.rla-lgx { color: var(--muted); font-weight: 400; }
.rla-lgdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rla-tone, var(--rla-grey)); flex: 0 0 auto; }
.rla-tools { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.rla-search { flex: 1 1 280px; max-width: 520px; position: relative; display: flex; align-items: center; }
.rla-search svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.rla-search input { width: 100%; min-height: 44px; padding-left: 38px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-raised); color: var(--white); font: inherit; font-size: 15px; }
.rla-tools .btn { min-height: 44px; }

.rla-group { margin: 0 0 18px; }
.rla-gh { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .3px; color: var(--white); }
.rla-gn { color: var(--muted); font-weight: 600; }
.rla-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.rla-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(150px, auto) 96px; column-gap: 16px; align-items: center; padding: 12px 18px; min-height: 68px; border-top: 1px solid var(--border); }
.rla-row:first-child { border-top: 0; }
.rla-c { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rla-c-st { align-items: flex-start; gap: 6px; }
.rla-c-act { align-items: flex-end; }
.rla-link { background: none; border: 0; padding: 0; margin: 0; min-height: 24px; text-align: left; font: inherit; font-size: 15px; font-weight: 600; color: var(--white); cursor: pointer; overflow-wrap: anywhere; }
.rla-link:hover { text-decoration: underline; }
.rla-code { font-size: 12px; font-weight: 600; color: var(--muted); }
.rla-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.rla-store { font-size: 14.5px; font-weight: 600; color: var(--white); overflow-wrap: anywhere; }
.rla-store-dim, .rla-dim { color: var(--muted); font-weight: 500; }
.rla-meta b { color: var(--white); }
.rla-over { color: var(--rla-red); font-weight: 600; }
.rla-dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.rla-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--border-light, var(--border)); background: transparent; display: inline-block; }
.rla-dot.is-on { background: var(--muted); border-color: var(--muted); }
.rla-people { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; }
.rla-person { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 12%, transparent); color: var(--white); font-weight: 500; }
.rla-av { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold); font-size: 10px; font-weight: 700; flex: 0 0 auto; }
.rla-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.35; white-space: nowrap; color: var(--rla-tone, var(--rla-grey)); background: color-mix(in srgb, var(--rla-tone, var(--rla-grey)) 13%, transparent); }
.rla-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rla-tone, var(--rla-grey)); }
.rla-chip { display: inline-flex; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.rla-act { min-height: 44px; min-width: 88px; }

.rla-empty { padding: 36px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 16px; }
.rla-empty-t { font-size: 16px; font-weight: 600; color: var(--white); }
.rla-empty-s { font-size: 14px; color: var(--muted); max-width: 46ch; }

/* sheet */
.rla-sheet-wrap { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: stretch; justify-content: flex-end; }
.rla-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.rla-sheet { position: relative; width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--bg-raised); color: var(--white); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(0, 0, 0, .25); overflow-y: auto; overscroll-behavior: contain; }
html.rla-lock body { overflow: hidden; }
.rla-sh-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; background: var(--bg-raised); border-bottom: 1px solid var(--border); }
.rla-sh-title { margin: 2px 0 0; font-size: 20px; line-height: 26px; font-weight: 700; overflow-wrap: anywhere; }
.rla-x { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.rla-x svg { width: 22px; height: 22px; }
.rla-x:hover { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--white); }
.rla-sh-body { padding: 8px 20px 28px; display: flex; flex-direction: column; gap: 6px; }
.rla-sec { padding: 14px 0; border-top: 1px solid var(--border); }
.rla-sec:first-child { border-top: 0; }
.rla-sec-h { margin: 0 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.rla-pad { padding: 4px 0 8px; }
.rla-banner { padding: 10px 14px; border-radius: 12px; font-size: 14px; background: color-mix(in srgb, var(--rla-green) 13%, transparent); color: var(--white); margin: 10px 0 0; }
.rla-banner.is-bad { background: color-mix(in srgb, var(--rla-red) 14%, transparent); }
.rla-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 0; }
.rla-step-t { font-size: 14.5px; font-weight: 600; min-width: 0; }
.rla-step-t .rla-meta { font-weight: 400; margin-top: 2px; }
.rla-stepper { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.rla-sb { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-base, transparent); color: var(--white); cursor: pointer; }
.rla-sb svg { width: 18px; height: 18px; }
.rla-sb[disabled] { opacity: .4; cursor: default; }
.rla-sn { min-width: 36px; text-align: center; font-size: 18px; font-variant-numeric: tabular-nums; }
.rla-lk { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--gold); cursor: pointer; text-decoration: underline; min-height: 24px; }
.rla-store-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; }
.rla-sc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 0 0 4px; }
.rla-sc-n { font-size: 15px; overflow-wrap: anywhere; }
.rla-runners { display: flex; flex-direction: column; margin: 6px 0 0; }
.rla-ru { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); min-height: 52px; }
.rla-ru:first-child { border-top: 0; }
.rla-ru-n { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.rla-ru .btn { min-height: 44px; flex: 0 0 auto; }
.rla-ru .rla-av { width: 30px; height: 30px; font-size: 12px; }
.rla-lab { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.rla-store-in { width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-base, var(--bg-raised)); color: var(--white); font: inherit; font-size: 15px; padding: 0 12px; box-sizing: border-box; }
.rla-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.rla-pillbtn { min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--white); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.rla-pillbtn.is-on { border-color: var(--gold); color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.rla-cap { margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.rla-cap.is-full { background: color-mix(in srgb, var(--rla-red) 13%, transparent); }
.rla-tools2 { display: flex; flex-wrap: wrap; gap: 10px; }
.rla-tools2 .btn { min-height: 44px; }
.rla-hist { display: flex; flex-direction: column; }
.rla-h { padding: 9px 0; border-top: 1px solid var(--border); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.rla-h:first-child { border-top: 0; }
.rla-when { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

.rla-panel { margin: 12px 0; }
.rla-panel-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }

@media (max-width: 1100px) {
  .rla-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; row-gap: 8px; }
  .rla-row .rla-c-addr { grid-column: 1 / 3; grid-row: 1; }
  .rla-row .rla-c-act { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .rla-row .rla-c-store { grid-column: 1; grid-row: 2; }
  .rla-row .rla-c-people { grid-column: 2; grid-row: 2; }
  .rla-row .rla-c-st { grid-column: 1 / 3; grid-row: 3; flex-direction: row; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .rla-head { align-items: flex-start; flex-wrap: wrap; }
  .rla-title { font-size: 20px; line-height: 26px; }
  .rla-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .rla-row .rla-c-addr { grid-column: 1; grid-row: 1; }
  .rla-row .rla-c-act { grid-column: 2; grid-row: 1; align-self: start; }
  .rla-row .rla-c-store { grid-column: 1 / 3; grid-row: 2; }
  .rla-row .rla-c-people { grid-column: 1 / 3; grid-row: 3; }
  .rla-row .rla-c-st { grid-column: 1 / 3; grid-row: 4; }
  .rla-sheet-wrap { align-items: flex-end; }
  .rla-sheet { width: 100%; max-height: 92%; border-left: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .3); }
  .rla-sh-body { padding: 8px 16px 32px; }
  .rla-sh-head { padding: 16px 16px 12px; }
  .rla-legend .rla-lgx { display: none; }
}

/* Runners per address replaces the watches-per-address limit: the Ship-to grid drops its Limit / Remaining / Status columns (the data stays in the database). */
html.wf-rl-on #lm-grid-table :is(th, td):is(:nth-child(4), :nth-child(5), :nth-child(7)) { display: none; }

.rla-tools [hidden], .rla-head [hidden] { display: none !important; }
.rla-logbtn { margin-left: auto; }
/* five tabs on a phone: labels only, tighter, so Addresses | Incoming | Stock | Map | Ship-to all fit (and each tab is a 44px tap) */
@media (max-width: 640px) {
  html.wf-ship-on #page-locations .lm-tabs.lm-tabs-5 { height: 52px; }
  html.wf-ship-on #page-locations .lm-tabs.lm-tabs-5 button { padding: 0 4px !important; gap: 0 !important; font-size: 13px !important; height: 44px; min-height: 44px; flex: 1 1 auto; white-space: nowrap; min-width: 0; }
  html.wf-ship-on #page-locations .lm-tabs.lm-tabs-5 button svg { display: none !important; }
}
@media (max-width: 640px) { .rla-logbtn { margin-left: 0; } .rla-search { flex-basis: 100%; max-width: none; } }

/* KPI law on the phone: the figure's box is as tall as its glyphs (it was 21px for a 24px line and clipped by 3px) */
html body #lm-addr-view .wf-kpi-rail.rla-kpis .pay-kpi-value { line-height: 26px; height: auto; min-height: 26px; overflow: visible; }
html body #lm-addr-view .wf-kpi-rail.rla-kpis .pay-kpi-label { white-space: nowrap; overflow: hidden; text-overflow: clip; }
