/* Warehouse screen. Uses np.css tokens only. */
.wms-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.wms-kpis .kpi .value { font-size: 28px; }

/* Floor plan */
.wms-plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 22px; align-items: start; }
.wms-plan-wrap { overflow-x: auto; min-width: 0; }
.wms-plan { max-width: 100%; }
.wms-fp { display: block; width: 100%; height: auto; }
.wms-site { fill: none; stroke: var(--line-2); stroke-width: .3; stroke-dasharray: 1.2 .9; }
.wms-bldg { fill: var(--card); stroke: var(--ink); stroke-width: .5; }
.wms-office { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: .25; }
.wms-gate { stroke: var(--ink); stroke-width: .9; stroke-dasharray: 2 1; }
.wms-hatch { stroke: var(--line-2); stroke-width: .3; }
.wms-dot { fill: var(--mute); opacity: .55; }
.wms-shelf { stroke: var(--line-2); stroke-width: .14; }
.wms-scale line { stroke: var(--ink); stroke-width: .25; }

.wms-area, .wms-rack { cursor: pointer; outline: none; }
.wms-area > .wms-shape { fill: var(--paper); stroke: var(--ink); stroke-width: .3; transition: stroke-width .12s, fill .12s; }
.wms-zone > .wms-shape { fill: var(--paper); }
.wms-room > .wms-shape { fill: var(--paper); }
.wms-bay > .wms-shape { fill: var(--card); stroke-dasharray: .9 .5; }
.wms-canopy > .wms-shape { stroke-dasharray: 1.8 .6; }
.wms-rack > .wms-shape { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: .2; }
.wms-area:hover > .wms-shape, .wms-area:focus-visible > .wms-shape { stroke-width: .75; }
.wms-rack:hover > .wms-shape, .wms-rack:focus-visible > .wms-shape { stroke: var(--ink); stroke-width: .5; fill: var(--paper-3); }
.wms-area:focus-visible > .wms-shape { stroke-dasharray: none; }
.wms-area.is-on > .wms-shape { fill: var(--ink) !important; stroke: var(--ink); }
.wms-area.is-on > text { fill: var(--on-night); }
.wms-rack.is-on > .wms-shape { fill: var(--ink); stroke: var(--ink); }

.wms-fp text { fill: var(--ink); pointer-events: none; }
.wms-t-cap { font: 500 1.5px var(--mono); letter-spacing: .12px; fill: var(--mute) !important; }
.wms-t-zone { font: 600 1.9px var(--mono); letter-spacing: .1px; }
.wms-t-name { font: 500 2.1px var(--sans); }
.wms-t-sm { font: 500 1.6px var(--sans); }
.wms-t-xs { font: 500 1.4px var(--mono); fill: var(--mute) !important; }
.wms-t-count { font: 500 3.2px var(--serif); }
.wms-t-count-sm { font: 500 2.6px var(--serif); }

.wms-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.wms-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wms-key { display: inline-block; width: 16px; height: 11px; border: 1px solid var(--ink); border-radius: 2px; }
.wms-key-rack { background: var(--paper-2); border-color: var(--ink-2); }
.wms-key-yard { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--line-2) 3px 4px); }
.wms-key-canopy { border-style: dashed; background: radial-gradient(var(--mute) .7px, transparent .8px) 0 0 / 4px 4px; }
.wms-key-bay { border-style: dashed; background: var(--card); }

.wms-areas { border-left: 1px solid var(--line); padding-left: 18px; display: flex; flex-direction: column; gap: 14px; }
.wms-areas-group { display: flex; flex-direction: column; gap: 2px; }
.wms-areas-group .eyebrow { margin-bottom: 4px; }
.wms-arow { display: flex; justify-content: space-between; gap: 10px; border: 0; background: none; padding: 5px 9px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; }
.wms-arow:hover { background: var(--paper-2); }
.wms-arow[aria-pressed="true"] { background: var(--ink); color: var(--on-night); }

/* Table tools */
.wms-toolbar { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.wms-toolbar .field { min-width: 160px; }
.wms-toolbar .wms-search { flex: 1 1 220px; }
.wms-scan { flex: 0 1 250px; }
.wms-scan-box { position: relative; }
.wms-scan-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.wms-scan-box .input { padding-left: 36px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; background: var(--paper); }
.wms-scan-box .input::placeholder { text-transform: none; font-family: var(--sans); }
.wms-active { padding: 10px 20px; border-bottom: 1px solid var(--line); gap: 8px; min-height: 48px; }
.wms-active .chip.is-filter { background: var(--paper-2); }
.wms-uin { font-weight: 500; white-space: nowrap; }

.wms-colf { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; border: 1px solid transparent; background: none; color: var(--mute); border-radius: 6px; padding: 2px 4px; cursor: pointer; vertical-align: middle; font: 500 10.5px var(--mono); }
.wms-colf svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linejoin: round; }
.wms-colf:hover { border-color: var(--line-2); color: var(--ink); }
.wms-colf.is-on { background: var(--ink); color: var(--on-night); }

.wms-pop { position: absolute; z-index: 70; width: 270px; max-height: 380px; overflow-y: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 12px; }
.wms-pop-list { display: flex; flex-direction: column; margin: 8px 0 12px; }
.wms-pop-list .check { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; padding: 5px 2px; font-size: 13px; }
.wms-menu { width: 240px; padding: 6px; }
.wms-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 11px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.wms-menu button:hover, .wms-menu button:focus-visible { background: var(--paper-2); }
.wms-menu button[aria-disabled="true"] { color: var(--mute); }
.wms-menu .sub { display: block; font-size: 11.5px; color: var(--mute); }

.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.wms-util { display: inline-grid; grid-template-columns: 70px 40px; gap: 8px; align-items: center; }
.wms-check-head { grid-template-columns: 1fr 1fr 1.3fr; }

@media (max-width: 1180px) {
  .wms-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wms-plan-layout { grid-template-columns: 1fr; }
  .wms-areas { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 920px) { .wms-check-head { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .wms-kpis { grid-template-columns: 1fr 1fr; }
  .wms-toolbar .field, .wms-scan { flex: 1 1 100%; min-width: 0; }
}

#wms-exc .tbl { min-width: 880px; }
