/* Site access map (D254–D256, docs/18): the "Set truck access" window and the read-only map, shared by every app.
   Bronze in place of yellow, as on the home page and every account (D556): --sm-yellow keeps its name so the rules below stay. */
.sm-dialog { --sm-ink: #172126; --sm-ink2: #2b3a41; --sm-muted: #566973; --sm-line: #dce4e8; --sm-yellow: #cfae80; --sm-yellow-d: #b28c60; --sm-teal: #0e4a5c; --sm-red: #c62828;
  width: min(980px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 18px; color: var(--sm-ink); background: #fff;
  box-shadow: 0 24px 60px rgba(16, 24, 32, .35); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sm-dialog::backdrop { background: rgba(16, 24, 32, .55); }
.sm-box { display: flex; flex-direction: column; gap: 12px; padding: 22px 26px 20px; }
.sm-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.sm-eyebrow { margin: 0 0 4px; color: var(--sm-muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sm-head h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.sm-sub { margin: 6px 0 0; color: var(--sm-muted); }
.sm-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--sm-ink); font-size: 30px; line-height: 1; cursor: pointer; }
.sm-x:hover { background: #f1f4f5; }
.sm-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sm-pt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--sm-line); border-radius: 12px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sm-pt b { display: block; font-size: 16px; }
.sm-pt small { display: block; color: var(--sm-muted); font-size: 13px; }
.sm-pt.set small { color: #1e7a3c; font-weight: 600; }
.sm-pt[aria-pressed="true"] { border: 2px solid var(--sm-ink); padding: 9px 13px; background: #fffaf0; }
.sm-num { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; font-weight: 800; font-size: 18px; }
.sm-num.n1 { background: var(--sm-yellow); color: var(--sm-ink); }
.sm-num.n2 { background: var(--sm-teal); color: #fff; }
/* Remove under a set point's card (D1163): the holder keeps the card filling its cell; the other card's Remove keeps its room, unseen, so the two cards stay level. */
.sm-ptw { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
.sm-pt-rm { justify-self: end; min-height: 32px; padding: 4px 4px 4px 14px; border: 0; background: none; color: var(--sm-red); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sm-pt-rm[hidden] { display: none; }
.sm-pt-rm.off { visibility: hidden; }
.sm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sm-tools-h { margin: 0; font-weight: 800; font-size: 17px; }
.sm-tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-tool, .sm-btn { min-height: 40px; padding: 8px 14px; border: 1px solid var(--sm-line); border-radius: 10px; background: #fff; color: var(--sm-ink); font: inherit; font-weight: 600; cursor: pointer; }
.sm-tool:hover:not(:disabled), .sm-btn:hover:not(:disabled) { border-color: var(--sm-ink); }
.sm-tool:disabled, .sm-btn:disabled { opacity: .45; cursor: default; }
.sm-tool.draw:not(:disabled), .sm-tool[aria-pressed="true"] { background: var(--sm-yellow); border-color: var(--sm-yellow); }
.sm-tool.avoid { color: var(--sm-red); }
.sm-tool.avoid[aria-pressed="true"] { background: #fdecea; border-color: var(--sm-red); color: var(--sm-red); }
.sm-tool.rm { color: var(--sm-red); }
.sm-hint { margin: 0; min-height: 1.45em; color: var(--sm-muted); font-size: 14px; }
.sm-dialog.ro .sm-hint { display: none; }
.sm-stage { position: relative; aspect-ratio: 1600 / 1000; overflow: hidden; border-radius: 12px; background: #86a95c; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.sm-dialog.ro .sm-stage { cursor: grab; }
.sm-stage:focus-visible { outline: 3px solid var(--sm-ink); outline-offset: 2px; }
.sm-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.sm-layer img, .sm-view-btn img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.sm-over { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sm-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.sm-zoom button { width: 40px; height: 40px; border: 0; background: #fff; color: var(--sm-ink); font-size: 22px; font-weight: 700; cursor: pointer; }
.sm-zoom button + button { border-top: 1px solid var(--sm-line); }
/* The compass on a map turned with two fingers (2026-10-28): red tip north; a tap turns north up. */
.sm-zoom [hidden] { display: none; }
.sm-zoom [data-sm="north"]:not([hidden]) { display: grid; place-items: center; padding: 0; }
.sm-zoom [data-sm="north"] svg { width: 24px; height: 24px; fill: #9aa6ab; }
.sm-zoom .sm-north-n { fill: #c8352b; }
.sm-chip { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--sm-ink2); font-size: 12px; font-weight: 600; pointer-events: none; }
/* the overlay: path, bends, pins, labels, areas to avoid */
.sm-route-under { fill: none; stroke: rgba(23, 33, 38, .45); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.sm-route { fill: none; stroke: #cfae80; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.sm-route.drawing { stroke-dasharray: 14 9; }
.sm-bend { fill: #fff; stroke: #172126; stroke-width: 2.5; }
.drag { cursor: grab; }
.sm-pin-body { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.sm-pin.entrance .sm-pin-body { fill: #cfae80; stroke: #172126; stroke-width: 2; }
.sm-pin.spot .sm-pin-body { fill: #0e4a5c; }
.sm-pin-num { font: 800 17px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #172126; pointer-events: none; }
.sm-pin.spot .sm-pin-num { fill: #fff; }
.sm-pin-ring { fill: none; stroke: #fff; stroke-width: 4; stroke-dasharray: 5 4; }
.sm-area rect { fill: #fff; stroke: rgba(23, 33, 38, .25); }
.sm-area text, .sm-avoid-txt { font: 600 13px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #172126; }
.sm-avoid-dot { fill: #fff; stroke: #c62828; stroke-width: 3; }
.sm-avoid-bar { stroke: #c62828; stroke-width: 4; stroke-linecap: round; }
.sm-avoid-chip { fill: #fff; stroke: #c62828; stroke-width: 2; }
.sm-avoid-txt { fill: #c62828; }
.sm-msg { padding: 12px 14px; border: 1px solid #efd27a; border-radius: 12px; background: #fff6d6; }
.sm-msg p { margin: 0 0 10px; }
.sm-msg-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.sm-avoid-q { display: grid; gap: 6px; margin-bottom: 10px; font-weight: 600; }
.sm-avoid-q input, .sm-notes textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--sm-line); border-radius: 10px; font: inherit; color: inherit; background: #fff; }
.sm-notes { display: grid; gap: 6px; font-weight: 700; }
.sm-notes textarea { resize: vertical; font-weight: 400; }
.sm-ro-notes { margin: 0; }
.sm-shared { margin: -4px 0 0; color: var(--sm-muted); font-size: 13px; }
/* The site's photos and video in the customer's window (D440, site-media.css draws the tiles). */
.sm-media { display: grid; gap: 6px; }
.sm-media-h { margin: 0; font-weight: 700; }
.sm-media-hint { margin: 0; color: var(--sm-muted); font-size: 13px; }
.sm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sm-gap { flex: 1; }
.sm-primary { background: var(--sm-yellow); border-color: var(--sm-yellow); }
.sm-primary:hover:not(:disabled) { background: var(--sm-yellow-d); border-color: var(--sm-yellow-d); }
/* the read-only map on details screens */
.sm-view { display: grid; gap: 6px; max-width: 560px; }
.sm-view-btn { position: relative; display: block; width: 100%; aspect-ratio: 1600 / 1000; padding: 0; overflow: hidden; border: 1px solid #dce4e8; border-radius: 10px; background: #86a95c; cursor: zoom-in; }
.sm-view-btn:focus-visible { outline: 3px solid #172126; outline-offset: 2px; }
.sm-view-btn .sm-over { pointer-events: none; }
.sm-view-sum { margin: 0; font-size: 13px; color: #566973; }
.sm-view-notes { margin: 0; font-size: 14px; }
@media (max-width: 640px) {
  .sm-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .sm-box { gap: 10px; padding: 14px 14px 16px; min-height: 100%; box-sizing: border-box; }
  .sm-head h2 { font-size: 20px; }
  .sm-sub { font-size: 14px; }
  .sm-points { gap: 8px; }
  .sm-pt { gap: 8px; min-height: 56px; padding: 8px 10px; }
  .sm-pt[aria-pressed="true"] { padding: 7px 9px; }
  .sm-pt b { font-size: 14px; }
  .sm-num { width: 32px; height: 32px; font-size: 16px; }
  .sm-sub { font-size: 13px; }
  .sm-tools { gap: 6px; }
  .sm-tool-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; width: 100%; }
  .sm-tool { min-height: 38px; padding: 6px 10px; font-size: 14px; }
  .sm-tool.avoid { grid-column: span 2; }
  .sm-stage { aspect-ratio: auto; height: 50dvh; min-height: 260px; }
  .sm-dialog.ro .sm-stage { aspect-ratio: 1600 / 1000; height: auto; min-height: 0; } /* viewing: the whole picture */
  .sm-dialog.ro { inset: auto 0 0 0; height: auto; margin: 0; border-radius: 16px 16px 0 0; } /* viewing opens as a sheet from the bottom */
  .sm-dialog.ro .sm-box { min-height: 0; }
  .sm-foot .sm-btn { flex: 1 1 40%; }
  .sm-gap { display: none; }
}
/* Drop spots (D380–D385, docs/33): more spot buttons, "Add drop spot", the driver's ringed spot and the loads per spot box. */
.sm-points.multi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (min-width: 641px) { .sm-points.multi > .sm-pt { align-self: start; } }
.sm-pt b { overflow-wrap: anywhere; }
.sm-add { border-style: dashed; border-color: #b9c6cc; }
.sm-add:disabled { opacity: .5; cursor: default; }
.sm-add[aria-pressed="true"] { border: 2px solid var(--sm-ink); padding: 9px 13px; background: #fffaf0; }
.sm-num.sm-plus { border: 2px dashed #9fb0b8; color: var(--sm-ink2); background: #fff; font-size: 22px; box-sizing: border-box; }
.sm-pin.dim, .sm-area.dim, .sm-dot.dim { opacity: .45; }
/* Several drop spots: small numbered dots (D659); the chosen one is drawn as the full pin instead. */
.sm-dot-body { fill: #0e4a5c; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.sm-dot-num { font: 800 13px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #fff; pointer-events: none; }
.sm-pin-focus { fill: none; stroke: #cfae80; stroke-width: 5; }
.sm-area.focus rect { stroke: #172126; stroke-width: 2; }
.sm-area.focus text { font-weight: 800; }
.sm-split { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--sm-line); border-radius: 12px; background: #f7f9fa; }
.sm-split[hidden] { display: none; }
.sm-split-h { margin: 0; font-weight: 800; font-size: 17px; }
.sm-split-sub { margin: -6px 0 0; color: var(--sm-muted); font-size: 13px; }
.sm-split-line { display: grid; gap: 6px; }
.sm-split-line + .sm-split-line { padding-top: 10px; border-top: 1px solid var(--sm-line); }
.sm-split-name { margin: 0; font-size: 14px; color: var(--sm-ink2); }
.sm-split-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sm-split-row .sm-num { width: 28px; height: 28px; font-size: 14px; }
.sm-split-spot { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sm-step { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--sm-line); border-radius: 10px; background: #fff; }
.sm-step button { width: 44px; height: 42px; border: 0; background: #fff; color: var(--sm-ink); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }
.sm-step button:disabled { color: #b9c6cc; cursor: default; }
.sm-step b { min-width: 30px; text-align: center; font-size: 17px; }
.sm-split-rest { display: inline-grid; justify-items: center; min-width: 120px; line-height: 1.15; }
.sm-split-rest b { font-size: 17px; }
.sm-split-rest small { color: var(--sm-muted); font-size: 12px; }
.sm-legend { display: grid; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 14px; }
.sm-legend li { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 8px 2px 2px; border-radius: 8px; }
.sm-legend .sm-num { width: 24px; height: 24px; font-size: 13px; background: #0e4a5c; color: #fff; } /* outside the window, so no --sm-teal */
.sm-legend li.on { background: #f4f6f7; font-weight: 700; box-shadow: inset 3px 0 0 #b28c60; }
.sm-legend small { margin-left: auto; color: #566973; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 640px) {
  .sm-points.multi { grid-template-columns: 1fr 1fr; }
  .sm-points.multi .sm-pt { min-height: 50px; }
  .sm-add { grid-column: 1 / -1; min-height: 44px; }
  .sm-add > span:last-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .sm-add .sm-num { width: 28px; height: 28px; font-size: 18px; }
  .sm-add[aria-pressed="true"] { padding: 7px 9px; }
  .sm-split { padding: 12px; }
}
/* The real map (D400–D401, docs/23): Mapbox's aerial map fills the same stage; the address search sits above it. */
.sm-layer.sm-real { width: 100%; height: 100%; transform: none; }
.sm-layer[hidden] { display: none; }
.sm-real .mapboxgl-canvas { cursor: inherit; }
.sm-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; background: #2b3a41; color: #fff; font-weight: 600; text-align: center; }
.sm-wait[hidden], .sm-chip[hidden], .sm-find[hidden] { display: none; }
.sm-find { display: flex; gap: 8px; }
.sm-find input { flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--sm-line); border-radius: 10px; font: inherit; font-size: 16px; color: inherit; background: #fff; }
.sm-find .sm-btn { min-height: 44px; }
.sm-view-real { background: #2b3a41; }
.sm-view-btn img[hidden] { display: none; }
/* A driver's map starts with only this load's drop spot; the button under the list shows the others. */
.sm-view[data-sm-solo="1"] .sm-legend li:not(.on) { display: none; }
.sm-solo-btn { justify-self: start; min-height: 44px; padding: 8px 14px; border: 1px solid #c9d3d8; border-radius: 999px; background: #fff; color: #0e4a5c; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.sm-solo-btn:hover { background: #f4f6f7; }
.sm-solo-btn:focus-visible { outline: 3px solid #b28c60; outline-offset: 2px; }
.sm-dialog .sm-solo { align-self: flex-start; }

/* D534 (Rafa, 2026-10-26): the home page's truck and material icons on the pins and the points row, names on the map only for
   named spots, the path's dashes flowing toward the drop spot, and a red "Throw away" that shakes into view after X */
.sm-num { position: relative; }
.sm-num .sm-ico { width: 64%; height: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sm-num .sm-badge { position: absolute; top: -6px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #172126; color: #fff; box-shadow: 0 0 0 2px #fff; font: 800 11px/18px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-style: normal; text-align: center; box-sizing: border-box; }
.sm-pin-ico { overflow: visible; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.sm-pin.entrance .sm-pin-ico { stroke: #172126; }
.sm-pin.spot .sm-pin-ico { stroke: #fff; }
.sm-pin-badge circle { fill: #172126; stroke: #fff; stroke-width: 2; }
.sm-pin-badge text { font: 800 11px system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; fill: #fff; pointer-events: none; }
.sm-area rect { fill: rgba(255, 255, 255, .82); }
.sm-route-flow { fill: none; stroke: #fffbea; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 16; animation: smFlow 1.1s linear infinite; pointer-events: none; }
@keyframes smFlow { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
.sm-danger { background: #c8352b; border-color: #c8352b; color: #fff; }
.sm-danger:hover:not(:disabled) { background: #a92a21; border-color: #a92a21; }
.sm-danger:focus-visible { outline: 3px solid #172126; outline-offset: 2px; }
.sm-msg.sm-alert { border-color: #eba59d; background: #fdeeec; animation: smAlert .65s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes smAlert {
  0% { transform: none; box-shadow: 0 0 0 0 rgba(200, 53, 43, .5); }
  15%, 85% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(5px); }
  45% { transform: translateX(-7px); }
  58% { transform: translateX(7px); }
  100% { transform: none; box-shadow: 0 0 0 12px rgba(200, 53, 43, 0); }
}
@media (prefers-reduced-motion: reduce) { .sm-route-flow, .sm-msg.sm-alert { animation: none; } }
