.warehouse-map-page{display:grid;gap:16px;min-width:0}
.warehouse-map-under-development{display:grid;align-content:center;justify-items:center;gap:14px;min-width:0;min-height:320px;padding:32px 20px;border:1px solid var(--ui-border);border-radius:var(--ds-radius-lg,12px);background:var(--ui-surface);color:var(--ui-text-primary);text-align:center;overflow-wrap:anywhere}
.warehouse-map-under-development h3,.warehouse-map-under-development p{margin:0}.warehouse-map-under-development h3{font-size:20px}.warehouse-map-under-development p{font-size:24px;font-weight:650}.warehouse-map-under-development small{color:var(--ui-text-secondary);line-height:1.7}
.warehouse-map-toolbar{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border:1px solid var(--ui-border);border-radius:var(--ds-radius-lg,12px);background:var(--ui-surface)}
.warehouse-map-toolbar__filters,.warehouse-map-toolbar__actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.warehouse-map-field{display:grid;gap:5px;color:var(--ui-text-secondary);font-size:12px}
.warehouse-map-field select,.warehouse-map-field input{height:38px;min-width:210px;border:1px solid var(--ui-border);border-radius:var(--ds-radius-md,8px);background:var(--ui-surface);color:var(--ui-text-primary);padding:0 11px;font:inherit}
.warehouse-map-field input{min-width:260px}
.warehouse-map-status{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:0 10px;border-radius:999px;background:var(--ui-brand-soft);color:var(--ui-brand);font-size:12px;font-weight:650}
.warehouse-map-status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.warehouse-map-reconciliation{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border:1px solid var(--ui-border);border-radius:var(--ds-radius-lg,12px);background:var(--ui-surface)}
.warehouse-map-reconciliation div{display:grid;gap:3px;min-width:0}.warehouse-map-reconciliation strong{color:var(--ui-text-primary)}.warehouse-map-reconciliation small{color:var(--ui-text-secondary)}
.warehouse-map-shell{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:600px;border:1px solid var(--ui-border);border-radius:var(--ds-radius-lg,12px);overflow:hidden;background:var(--ui-surface)}
.warehouse-map-stage{position:relative;min-width:0;min-height:600px;overflow:hidden;background:linear-gradient(var(--ui-border) 1px,transparent 1px),linear-gradient(90deg,var(--ui-border) 1px,transparent 1px),var(--ui-surface-soft);background-size:28px 28px}
.warehouse-map-svg{display:block;width:100%;height:600px;touch-action:none;cursor:grab;user-select:none}
.warehouse-map-svg.is-panning{cursor:grabbing}
.warehouse-map-zone{fill:var(--ui-surface);stroke:var(--ui-border-strong);stroke-width:2;vector-effect:non-scaling-stroke}
.warehouse-map-zone--aisle{fill:var(--ui-surface-soft);stroke-dasharray:6 4}
.warehouse-map-zone--entrance{fill:var(--ui-brand-soft)}
.warehouse-map-zone--unplaced{fill:var(--status-warning-soft,#fff3cd);stroke:var(--status-warning,#c58a08);stroke-dasharray:6 4}
/* SVG label sizes are calculated from the current viewBox and rendered viewport.
   A CSS font-size here would override that calculation and make millimetre text unreadable. */
.warehouse-map-zone-label{fill:var(--ui-text-secondary);font-weight:650;pointer-events:none}
.warehouse-map-location{fill:color-mix(in srgb,var(--ui-surface) 80%,var(--ui-brand-soft));stroke:var(--ui-border-strong);stroke-width:2;stroke-dasharray:5 3;vector-effect:non-scaling-stroke;cursor:pointer}
.warehouse-map-location-node:hover .warehouse-map-location,.warehouse-map-location-node:focus .warehouse-map-location{stroke:var(--ui-brand);stroke-width:2.5;outline:none}
.warehouse-map-location-label{fill:var(--ui-text-primary);font-weight:700;pointer-events:none}
.warehouse-map-unit{fill:var(--ui-surface);stroke:var(--ui-brand);stroke-width:2;vector-effect:non-scaling-stroke;cursor:pointer}
.warehouse-map-unit-node--unconfirmed .warehouse-map-unit{stroke:var(--status-warning,#c58a08);stroke-dasharray:5 3}
.warehouse-map-unit-node--estimated .warehouse-map-unit{stroke:var(--status-caution,#e46f1d)}
.warehouse-map-unit-node:hover .warehouse-map-unit,.warehouse-map-unit-node:focus .warehouse-map-unit{fill:var(--ui-surface-selected);stroke-width:2.5;outline:none}
.warehouse-map-unit-label{fill:var(--ui-text-primary);font-weight:700;pointer-events:none}
.warehouse-map-unit-status,.warehouse-map-unit-quantity-label{fill:var(--ui-text-secondary);pointer-events:none}
.warehouse-map-location-index{grid-column:1/-1;position:static;display:grid;gap:16px;min-width:0;padding:16px;border-top:1px solid var(--ui-border);background:var(--ui-surface)}
.warehouse-map-location-index__head{display:flex;align-items:start;justify-content:space-between;gap:12px;flex-wrap:wrap}.warehouse-map-location-index__head h3{margin:0;font-size:15px;color:var(--ui-text-primary)}.warehouse-map-location-index__head p{margin:5px 0 0;font-size:12px;color:var(--ui-text-secondary);line-height:1.6}.warehouse-map-location-index__head small{font-size:12px;color:var(--ui-text-muted)}
.warehouse-map-location-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.warehouse-map-location-group{min-width:0}.warehouse-map-location-group h4{margin:0 0 10px;font-size:14px;color:var(--ui-text-primary)}.warehouse-map-location-cards{display:grid;gap:10px}.warehouse-map-location-card{min-width:0;padding:12px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface)}
.warehouse-map-detail-link{display:block;width:100%;min-width:0;padding:0;border:0;background:transparent;color:var(--ui-text-primary);font:inherit;font-size:14px;text-align:left;line-height:1.6;overflow-wrap:anywhere;cursor:pointer}.warehouse-map-detail-link strong,.warehouse-map-detail-link b{display:block;font-weight:650}.warehouse-map-detail-link small{display:block;color:var(--ui-text-secondary);font-size:12px}.warehouse-map-detail-link:hover{color:var(--ui-brand)}.warehouse-map-detail-link:focus-visible,.warehouse-map-directory-product:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:3px;border-radius:4px}
.warehouse-map-location-code{display:block;margin-top:5px;color:var(--ui-text-muted);font-size:12px;overflow-wrap:anywhere}.warehouse-map-directory-unit{display:grid;gap:8px;margin-top:10px;padding:10px 12px;border-left:2px solid var(--ui-brand);border-radius:0 6px 6px 0;background:var(--ui-surface-soft)}.warehouse-map-directory-unit .warehouse-map-detail-link small{line-height:1.7}
.warehouse-map-directory-product{display:flex;align-items:start;justify-content:space-between;gap:12px;width:100%;min-width:0;padding:8px 0;border:0;border-top:1px solid var(--ui-border);background:transparent;color:var(--ui-text-primary);font:inherit;font-size:13px;text-align:left;line-height:1.6;cursor:pointer}.warehouse-map-directory-product span:first-child{min-width:0;overflow-wrap:anywhere}.warehouse-map-directory-product small{display:block;color:var(--ui-text-secondary);font-size:12px}.warehouse-map-directory-product>b{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}.warehouse-map-directory-product:hover{color:var(--ui-brand)}
.warehouse-map-directory-empty{margin:10px 0 0;color:var(--ui-text-muted);font-size:12px}.warehouse-map-legacy-list{display:grid;gap:8px;padding-top:14px;border-top:1px solid var(--ui-border)}.warehouse-map-legacy-list h4,.warehouse-map-legacy-list p{margin:0}.warehouse-map-legacy-list h4{font-size:14px;color:var(--ui-text-primary)}.warehouse-map-legacy-list p{font-size:12px;color:var(--ui-text-secondary)}
.warehouse-map-placement{fill:var(--ui-brand-soft);stroke:var(--ui-brand);stroke-width:2;vector-effect:non-scaling-stroke;cursor:pointer}
.warehouse-map-placement:hover,.warehouse-map-placement:focus{fill:var(--ui-surface-selected);stroke-width:2.5;outline:none}
.warehouse-map-placement-label{fill:var(--ui-text-primary);font-weight:700;pointer-events:none}
.warehouse-map-placement-quantity-label,.warehouse-map-placement-quantity{fill:var(--ui-text-secondary);pointer-events:none}
.warehouse-map-legend{display:flex;gap:12px;flex-wrap:wrap;margin:12px 14px 14px;padding:8px 10px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface);color:var(--ui-text-secondary);font-size:12px;box-shadow:var(--ui-shadow-sm)}
.warehouse-map-legend span{display:inline-flex;align-items:center;gap:6px}.warehouse-map-legend i{width:10px;height:10px;border-radius:2px;background:var(--ui-brand-soft);border:1px solid var(--ui-brand)}
.warehouse-map-legend .location{background:var(--ui-surface);border-style:dashed;border-color:var(--ui-border-strong)}
.warehouse-map-legend .unit{background:var(--ui-surface);border:2px solid var(--ui-brand)}
.warehouse-map-legend .unplaced{background:var(--status-warning-soft,#fff3cd);border-color:var(--status-warning,#c58a08)}
.warehouse-map-drawer{border-left:1px solid var(--ui-border);background:var(--ui-surface);min-width:0;max-height:600px;overflow:auto}
.warehouse-map-drawer__empty{display:grid;place-content:center;min-height:100%;padding:36px;text-align:center;color:var(--ui-text-muted)}
.warehouse-map-drawer__body{display:grid;gap:16px;padding:18px}
.warehouse-map-drawer__head{display:flex;align-items:start;justify-content:space-between;gap:12px}.warehouse-map-drawer__head h3{margin:0;color:var(--ui-text-primary);font-size:18px;line-height:1.5;overflow-wrap:anywhere}.warehouse-map-drawer__head small{display:block;margin-top:4px;color:var(--ui-text-secondary);font-size:12px;line-height:1.6}
.warehouse-map-scope{display:flex;gap:4px 12px;flex-wrap:wrap;margin:0;color:var(--ui-text-secondary);font-size:12px;line-height:1.6}.warehouse-map-location-focus{display:grid;gap:5px;min-width:0;padding:12px;border:1px solid var(--ui-border);border-left:3px solid var(--ui-brand);border-radius:8px;background:var(--ui-brand-soft);color:var(--ui-text-primary);overflow-wrap:anywhere}.warehouse-map-location-focus strong{font-size:15px;line-height:1.6}.warehouse-map-location-focus small{font-size:12px;line-height:1.7;color:var(--ui-text-secondary)}
.warehouse-map-trace{margin-top:5px;font-size:12px;font-weight:400;line-height:1.7}.warehouse-map-trace summary{cursor:pointer;color:var(--ui-text-secondary)}.warehouse-map-trace small{overflow-wrap:anywhere;color:var(--ui-text-muted)}
.warehouse-map-product{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:center}.warehouse-map-product img,.warehouse-map-photo-placeholder{width:64px;height:64px;border-radius:10px;border:1px solid var(--ui-border);background:var(--ui-surface-soft);object-fit:contain}.warehouse-map-photo-placeholder{display:grid;place-content:center;color:var(--ui-text-muted);font-size:11px;text-align:center}
.warehouse-map-product p,.warehouse-map-product small{margin:4px 0 0;color:var(--ui-text-secondary)}
.warehouse-map-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px}.warehouse-map-facts div{min-width:0;padding:10px;border-radius:8px;background:var(--ui-surface-soft)}.warehouse-map-facts dt{font-size:11px;color:var(--ui-text-muted)}.warehouse-map-facts dd{margin:4px 0 0;color:var(--ui-text-primary);font-weight:650;overflow-wrap:anywhere}
.warehouse-map-movements{display:grid;gap:8px}.warehouse-map-movement{padding:9px 0;border-top:1px solid var(--ui-border)}.warehouse-map-movement:first-child{border-top:0}.warehouse-map-movement strong,.warehouse-map-movement small{display:block}.warehouse-map-movement small{margin-top:3px;color:var(--ui-text-muted)}
.warehouse-map-description{margin:0;padding:10px 12px;border-left:3px solid var(--ui-brand);background:var(--ui-surface-soft);color:var(--ui-text-secondary);overflow-wrap:anywhere}
.warehouse-map-unit-list{display:grid;gap:8px}.warehouse-map-unit-list article{padding:10px;border:1px solid var(--ui-border);border-radius:8px;background:var(--ui-surface-soft)}.warehouse-map-unit-list strong,.warehouse-map-unit-list small{display:block}.warehouse-map-unit-list small{margin-top:4px;color:var(--ui-text-muted)}
.warehouse-map-empty{min-height:420px;display:grid;place-content:center;text-align:center;padding:32px;border:1px dashed var(--ui-border-strong);border-radius:12px;background:var(--ui-surface);color:var(--ui-text-secondary)}
.warehouse-map-empty h3{margin:0 0 8px;color:var(--ui-text-primary)}
.warehouse-map-pending{min-width:0;border:1px solid var(--ui-border);border-radius:var(--ds-radius-lg,12px);background:var(--ui-surface);overflow:hidden}
.warehouse-map-pending__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--ui-border)}
.warehouse-map-pending__head h4{margin:0;color:var(--ui-text-primary);font-size:15px}.warehouse-map-pending__head p{margin:5px 0 0;color:var(--ui-text-secondary);font-size:12px}
.warehouse-map-pending__scroll{max-height:350px;overflow:auto}
.warehouse-map-pending__table{width:100%;min-width:740px;border-collapse:collapse}
.warehouse-map-pending__table th,.warehouse-map-pending__table td{display:table-cell;vertical-align:middle;padding:12px 16px;border-bottom:1px solid var(--ui-border);text-align:left}
.warehouse-map-pending__table th{position:sticky;top:0;z-index:1;background:var(--ui-surface-soft);color:var(--ui-text-secondary);font-size:12px;font-weight:600}
.warehouse-map-pending__table tbody tr:last-child td{border-bottom:0}.warehouse-map-pending__table tbody tr:hover{background:var(--ui-surface-soft)}
.warehouse-map-pending__table th:first-child{width:42%}.warehouse-map-pending__table th:last-child{width:190px}
.warehouse-map-pending__table .warehouse-map-pending__quantity{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.warehouse-map-pending__actions{display:flex;align-items:center;gap:8px;white-space:nowrap}
.warehouse-map-pending .order-item-preview{max-width:none}.warehouse-map-pending .order-item-preview-copy{min-width:0}.warehouse-map-pending .order-item-preview-copy b,.warehouse-map-pending .order-item-preview-copy small{white-space:normal;overflow-wrap:anywhere}
.warehouse-map-pending__empty{margin:0;padding:24px 16px;color:var(--ui-text-muted)}
.warehouse-map-pending__error{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;color:var(--status-danger,#b42318);background:var(--status-danger-soft,#fff3f1)}
dialog.warehouse-map-confirm-modal{width:min(640px,calc(100vw - 32px));max-height:88vh;background:var(--ui-surface);color:var(--ui-text-primary)}
.warehouse-map-confirm-modal .modal-card{display:flex;flex-direction:column;max-height:88vh;padding:20px 24px}
.warehouse-map-confirm-modal .modal-card>header{flex:none;margin-bottom:16px}
.warehouse-map-confirm-modal #modalBody{min-height:0;overflow:auto;overscroll-behavior:contain}
.warehouse-map-confirm-form{display:grid;gap:14px;min-width:0}
.warehouse-map-confirm-product{padding:12px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-surface-soft)}
.warehouse-map-confirm-product .order-item-preview{max-width:none}.warehouse-map-confirm-product p{margin:10px 0 5px;font-size:13px}.warehouse-map-confirm-product small{color:var(--ui-text-secondary);font-size:12px}
.warehouse-map-confirm-form fieldset{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0;padding:0;border:0;min-width:0}
.warehouse-map-confirm-field{display:grid;gap:6px;min-width:0;color:var(--ui-text-primary);font-size:13px;font-weight:600}
.warehouse-map-confirm-field:has([name=locationId]),.warehouse-map-confirm-field:has([name=reason]){grid-column:1/-1}
.warehouse-map-confirm-field input,.warehouse-map-confirm-field select,.warehouse-map-confirm-field textarea{width:100%;min-width:0;padding:9px 11px;border:1px solid var(--ui-border-strong);border-radius:8px;background:var(--ui-surface);color:var(--ui-text-primary);font:inherit;font-weight:400}
.warehouse-map-confirm-field input,.warehouse-map-confirm-field select{height:40px}
.warehouse-map-confirm-field input:focus-visible,.warehouse-map-confirm-field select:focus-visible,.warehouse-map-confirm-field textarea:focus-visible{outline:2px solid var(--ui-focus-ring);outline-offset:1px;border-color:var(--ui-brand)}
.warehouse-map-confirm-field small{font-weight:400;font-size:12px;color:var(--ui-text-secondary)}
.warehouse-map-confirm-location{grid-column:1/-1;margin:-5px 0 0;padding:8px 10px;border-left:3px solid var(--ui-brand);background:var(--ui-surface-soft);color:var(--ui-text-secondary);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.warehouse-map-confirm-note{margin:0;color:var(--ui-text-secondary);font-size:12px;line-height:1.65}
.warehouse-map-confirm-status{min-height:20px;margin:0;color:var(--ui-text-secondary);font-size:13px;line-height:1.6;overflow-wrap:anywhere}.warehouse-map-confirm-status.is-error{color:var(--status-danger,#b42318)}
.warehouse-map-confirm-actions{position:sticky;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 0 0;border-top:1px solid var(--ui-border);background:var(--ui-surface)}
@media(max-width:1100px){.warehouse-map-shell{grid-template-columns:1fr}.warehouse-map-drawer{border-left:0;border-top:1px solid var(--ui-border);max-height:420px}.warehouse-map-stage{min-height:520px;height:auto}.warehouse-map-svg{min-height:520px;height:520px}}
@media(max-width:720px){.warehouse-map-confirm-modal .modal-card{padding:18px}.warehouse-map-confirm-form fieldset{grid-template-columns:1fr}.warehouse-map-pending__head{align-items:flex-start}.warehouse-map-pending__table th,.warehouse-map-pending__table td{padding:10px 12px}.warehouse-map-confirm-actions{flex-wrap:wrap}}
@media(max-width:720px){.warehouse-map-toolbar,.warehouse-map-toolbar__filters{align-items:stretch}.warehouse-map-field,.warehouse-map-field select,.warehouse-map-field input{width:100%;min-width:0}.warehouse-map-reconciliation{align-items:stretch;flex-direction:column}.warehouse-map-reconciliation button{width:100%}.warehouse-map-stage{min-height:460px;height:auto}.warehouse-map-svg{min-height:460px;height:460px}.warehouse-map-location-groups{grid-template-columns:1fr}.warehouse-map-facts{grid-template-columns:1fr}}
