:root{--bg:#f4f6f8;--card:#fff;--ink:#17202a;--muted:#667085;--line:#d0d5dd;--accent:#2457d6;--danger:#b42318;--ok:#067647}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 4vw;background:#17202a;color:#fff;position:sticky;top:0;z-index:10}.topbar a{color:#fff;text-decoration:none}.brand{font-weight:800;font-size:1.15rem}.topbar nav{display:flex;gap:14px;flex-wrap:wrap}.page{width:min(1180px,94vw);margin:28px auto}.narrow{max-width:680px}.footer{margin:40px 0;color:var(--muted);font-size:.9rem}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 2px 8px rgba(16,24,40,.05)}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid .wide{grid-column:1/-1}label{display:grid;gap:6px;font-weight:650}input,select,textarea,button,.button{font:inherit}input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:#fff}textarea{min-height:90px}button,.button{display:inline-block;border:0;border-radius:9px;background:var(--accent);color:#fff;padding:10px 15px;text-decoration:none;cursor:pointer;font-weight:700}.button.secondary,button.secondary{background:#475467}.button.danger,button.danger{background:var(--danger)}.actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center}.flash{padding:12px 14px;border-radius:9px;margin:12px 0;background:#eef4ff}.flash.error{background:#fee4e2;color:#912018}.flash.success{background:#dcfae6;color:#05603a}.muted{color:var(--muted)}.location-card img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:10px;background:#e4e7ec}.map-wrap{position:relative;border-radius:14px;overflow:hidden;background:#d0d5dd;min-height:320px;touch-action:none}.map-wrap>img{display:block;width:100%;height:auto;min-height:320px;object-fit:contain}.marker{position:absolute;z-index:1;transform:translate(-50%,-50%);border:3px solid #fff;border-radius:999px;width:48px;height:48px;display:grid;place-items:center;font-size:24px;box-shadow:0 3px 12px #0005;cursor:pointer;user-select:none}.marker:hover,.marker:focus-visible,.marker.selected,.marker.dragging{z-index:1000}.marker.selected{outline:4px solid #fdb022}.marker-label{position:absolute;top:52px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#111827;color:#fff;border-radius:6px;padding:3px 7px;font-size:12px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,visibility .12s ease;z-index:3}.marker.selected .marker-label,.marker.dragging .marker-label{opacity:1;visibility:visible}@media(hover:hover) and (pointer:fine){.marker:hover .marker-label,.marker:focus-visible .marker-label{opacity:1;visibility:visible}}.split{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:18px}.location-layout{align-items:start}.location-map-card,.storage-list-card{display:flex;flex-direction:column;max-height:calc(100vh - 190px);min-height:420px}.location-map-card h2,.storage-list-card h2{margin-top:0;flex:0 0 auto}.location-map-scroll,.storage-list-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.location-map-scroll{border-radius:14px;background:#d0d5dd}.location-map-help{margin:12px 0 0;flex:0 0 auto}.storage-list-scroll{padding-right:4px}.list{display:grid;gap:10px}.list-row{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;justify-content:space-between;gap:12px;align-items:center}.icon{font-size:32px}.tag{font-size:12px;border-radius:999px;padding:4px 8px;background:#eef2f6;color:#344054}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;background:#fff}.table th,.table td{text-align:left;padding:10px;border-bottom:1px solid var(--line)}dialog{border:0;border-radius:14px;max-width:620px;width:92vw;padding:0;box-shadow:0 20px 50px #0006}dialog::backdrop{background:#0008}dialog .card{border:0}.qr{background:#fff;padding:16px;display:inline-block}.hero{padding:28px;background:linear-gradient(135deg,#eef4ff,#fff);border-radius:16px;margin-bottom:20px}@media(max-width:760px){.topbar{align-items:flex-start;flex-direction:column}.split,.form-grid.two{grid-template-columns:1fr}.location-map-card,.storage-list-card{max-height:none;min-height:0}.location-map-scroll{max-height:70vh}.storage-list-scroll{max-height:none;overflow:visible}.page{width:min(96vw,1180px);margin:16px auto}.marker{width:44px;height:44px}.hide-mobile{display:none}}
.locations-card{padding:0;overflow:hidden}.locations-list{display:grid}.location-list-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:12px 16px;border-bottom:1px solid var(--line)}.location-list-row:last-child{border-bottom:0}.location-list-main{display:flex;align-items:center;gap:12px;min-width:0}.location-thumbnail{width:64px;height:40px;max-height:40px;object-fit:cover;border-radius:7px;background:#e4e7ec;flex:0 0 64px}.location-thumbnail-placeholder{display:grid;place-items:center;font-size:21px}.location-list-details{min-width:0}.location-list-details h2{font-size:1rem;line-height:1.25;margin:0 0 3px}.location-list-details p{font-size:.9rem;margin:0}.location-list-actions{justify-content:flex-end;flex:0 0 auto}.location-list-actions .button{padding:8px 12px;font-size:.9rem}@media(max-width:600px){.location-list-row{align-items:flex-start;flex-direction:column}.location-list-actions{width:100%;justify-content:flex-start}.location-list-actions .button{flex:1;text-align:center}}
.inline-form{display:inline-flex;margin:0}.inline-form button{white-space:nowrap}.danger-zone{margin-top:18px;border-color:#fecdca;background:#fff7f6}.danger-zone h2{color:var(--danger);margin-top:0}

/* Mobile map interaction and precise marker anchoring */
.map-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;flex:0 0 auto}.map-card-heading h2{margin:0}.map-menu-wrap{position:relative;z-index:1200}.map-menu-button{width:42px;height:42px;padding:0;font-size:26px;line-height:1;display:grid;place-items:center}.map-menu{position:absolute;right:0;top:48px;min-width:220px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px;box-shadow:0 12px 30px #0003;z-index:1300}.map-menu-item{display:block;width:100%;padding:10px 12px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;text-decoration:none;font-weight:650;cursor:pointer}.map-menu-item:hover,.map-menu-item:focus-visible{background:#eef2f6}.move-mode-notice{margin:10px 0;padding:9px 11px;border-radius:8px;background:#fff4cc;color:#7a4e00;font-weight:650}.map-wrap>img{width:100%;height:auto;min-height:0;object-fit:initial}.map-wrap{min-height:0;overflow:visible}.location-map-scroll{overflow:auto}.marker-icon{line-height:1}.marker-anchor{position:absolute;left:50%;top:100%;width:2px;height:14px;background:#111827;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 1px 1px #fff)}.marker-anchor::after{content:"";position:absolute;left:50%;bottom:-4px;width:8px;height:8px;border-radius:50%;background:#111827;border:2px solid #fff;transform:translateX(-50%);box-shadow:0 1px 3px #0005}.marker-label{top:68px}.map-wrap.move-mode{outline:3px solid #fdb022;outline-offset:-3px}.map-wrap.move-mode .marker{cursor:grab}.map-wrap.move-mode .marker.dragging{cursor:grabbing}
@media(max-width:760px){.location-map-scroll{max-height:70vh}.map-menu-button{display:grid}.marker-label{top:64px}}

/* Rotatable marker pointer. The marker coordinate remains the thumbnail center;
   the pointer can be rotated to identify the precise nearby location. */
.marker-anchor{left:50%;top:100%;width:2px;height:14px;transform:translateX(-50%);transform-origin:50% 0}
.marker.stem-90 .marker-anchor{left:50%;top:100%;width:2px;height:14px;transform:translateX(-50%) rotate(0deg);transform-origin:50% 0}
.marker.stem-180 .marker-anchor{left:0;top:50%;width:14px;height:2px;transform:translate(-100%,-50%);transform-origin:100% 50%}
.marker.stem-270 .marker-anchor{left:50%;top:0;width:2px;height:14px;transform:translate(-50%,-100%);transform-origin:50% 100%}
.marker.stem-0 .marker-anchor{left:100%;top:50%;width:14px;height:2px;transform:translateY(-50%);transform-origin:0 50%}
.marker.stem-90 .marker-anchor::after{left:50%;bottom:-4px;top:auto;right:auto;transform:translateX(-50%)}
.marker.stem-180 .marker-anchor::after{left:-4px;top:50%;bottom:auto;right:auto;transform:translate(-50%,-50%)}
.marker.stem-270 .marker-anchor::after{left:50%;top:-4px;bottom:auto;right:auto;transform:translate(-50%,-50%)}
.marker.stem-0 .marker-anchor::after{right:-4px;left:auto;top:50%;bottom:auto;transform:translate(50%,-50%)}
.map-menu-item:disabled{opacity:.45;cursor:not-allowed;background:transparent}

/* Independent physical anchor and movable storage label */
.marker-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:2}.marker-lines line{stroke:#111827;stroke-width:2;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1px 1px #fff)}
.marker{z-index:4}.marker-anchor-handle{position:absolute;z-index:5;width:18px;height:18px;padding:0;border:3px solid #fff;border-radius:999px;background:#111827;transform:translate(-50%,-50%);box-shadow:0 2px 6px #0008;cursor:grab;touch-action:none}.marker-anchor-handle:hover,.marker-anchor-handle:focus-visible,.marker-anchor-handle.dragging{z-index:1002;outline:3px solid #fdb022}.marker-anchor-handle.dragging{cursor:grabbing}.map-wrap:not(.move-mode) .marker-anchor-handle{opacity:.78}.map-wrap.move-mode .marker-anchor-handle{opacity:1}.marker.dragging{cursor:grabbing}.marker .marker-label{top:52px}
@media(max-width:760px){.marker-anchor-handle{width:20px;height:20px}.map-wrap:not(.move-mode) .marker-anchor-handle{pointer-events:none;opacity:.7}}

/* Location image zoom and pan controls */
.map-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.map-zoom-controls{display:flex;align-items:center;gap:6px}.map-zoom-button,.map-zoom-fit{height:38px;padding:0;display:grid;place-items:center}.map-zoom-button{width:38px;font-size:22px;line-height:1}.map-zoom-fit{min-width:46px;padding:0 10px}.map-zoom-button:disabled{opacity:.45;cursor:not-allowed}.map-zoom-level{min-width:48px;text-align:right;color:var(--muted);font-size:.88rem;font-weight:700}.location-map-scroll{position:relative;scroll-behavior:smooth}.location-map-scroll:focus-visible{outline:3px solid #84adff;outline-offset:2px}.map-wrap{width:100%;max-width:none;touch-action:pan-x pan-y}.map-wrap.move-mode{touch-action:none}.map-wrap>img{pointer-events:none;user-select:none;-webkit-user-drag:none}@media(max-width:760px){.map-card-heading{align-items:flex-start}.map-heading-actions{gap:6px}.map-zoom-level{display:none}.map-zoom-button,.map-zoom-fit{height:40px}.map-zoom-button{width:40px}}

/* Starter floor plans and orientation markers */
.view-source-fieldset{display:grid;gap:14px;margin:0;padding:16px;border:1px solid var(--line);border-radius:12px}.view-source-fieldset legend{padding:0 8px;font-weight:800}.view-source-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:.9rem}.view-source-divider::before,.view-source-divider::after{content:"";height:1px;background:var(--line);flex:1}.orientation-marker{position:absolute;z-index:6;transform:translate(-50%,-50%) rotate(var(--marker-rotation,0deg));width:48px;height:48px;padding:0;border:3px solid #fff;border-radius:10px;background:#fff;color:#17202a;display:grid;place-items:center;font-size:28px;box-shadow:0 3px 12px #0005;cursor:grab;touch-action:none;user-select:none}.orientation-marker:hover,.orientation-marker:focus-visible,.orientation-marker.dragging{z-index:1003;outline:3px solid #fdb022}.orientation-marker.dragging{cursor:grabbing}.orientation-label{position:absolute;left:50%;top:52px;transform:translateX(-50%) rotate(calc(-1 * var(--marker-rotation,0deg)));white-space:nowrap;background:#111827;color:#fff;border-radius:6px;padding:3px 7px;font-size:12px;opacity:0;visibility:hidden;pointer-events:none}.orientation-marker:hover .orientation-label,.orientation-marker:focus-visible .orientation-label,.orientation-marker.dragging .orientation-label{opacity:1;visibility:visible}.map-wrap.move-mode .orientation-marker{outline:2px solid #fdb022}@media(max-width:760px){.orientation-marker{width:46px;height:46px}.map-wrap:not(.move-mode) .orientation-marker{pointer-events:none}.map-wrap.move-mode .orientation-marker{pointer-events:auto}}
