/* Visits tab: Tripp Daugherty's dealer visits. Redesigned 2026-12-01 to
   Grant's pick, variant A of docs/dealer-visits/mockup-v6.html: a Calendar |
   Table switch beside Log a visit and Plan a visit, no map. Code: js/visits.js. */

#visits-view { flex-direction: column; overflow: hidden; }
.vx { display: flex; flex-direction: column; gap: 16px; height: 100%; min-height: 0; padding: 22px 30px 24px; }
.vx-head { display: flex; justify-content: flex-start; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.vx-title { min-width: 0; }
.vx-head h2 { margin: 0; font: 800 28px/1 var(--font-display); letter-spacing: -.02em; color: #fff; }
.vx-head p { margin: 6px 0 0; color: rgba(255, 255, 255, .6); font: 600 13px var(--font-ui); }
.vx-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 13px;
  font: 700 13.5px var(--font-ui); color: #fff; border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .07); cursor: pointer; white-space: nowrap; }
.vx-btn:hover { background: rgba(255, 255, 255, .13); }
.vx-btn.pri { background: #ff3b30; border-color: #ff3b30; }
.vx-btn.pri:hover { background: #ff5247; }
.vx-btn.del { color: #ff8a80; }
.vx-btn svg, .vx-switch svg, .vx-back svg, .vx-search svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.vx-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--aur-line); }
.vx-switch button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 0; background: none;
  font: 700 13px var(--font-ui); color: rgba(255, 255, 255, .75); cursor: pointer; }
.vx-switch button.on { background: #fff; color: var(--aur-ink); }
.vx-owner { display: inline-flex; align-items: center; gap: 10px; }
/* View as: a styled list, not the browser's own dropdown */
.vx-owndd { position: relative; }
.vx-ddbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; border-radius: 13px; border: 1px solid var(--aur-line-strong);
  background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; font: 700 13px var(--font-ui); }
.vx-ddbtn span { font-weight: 600; color: rgba(255, 255, 255, .55); }
.vx-ddbtn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; transition: transform .18s; }
.vx-ddbtn:hover { background: rgba(255, 255, 255, .12); }
.vx-ddbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.vx-ddlist { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 250px; padding: 6px; border-radius: 16px; background: #140909;
  border: 1px solid var(--aur-line-strong); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .85); animation: vxPop .14s ease-out both; }
.vx-ddopt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: #fff;
  font: 700 13.5px var(--font-ui); cursor: pointer; text-align: left; }
.vx-ddopt:hover, .vx-ddopt:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.vx-ddopt i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .1);
  font: 800 10.5px var(--font-ui); font-style: normal; color: rgba(255, 255, 255, .85); }
.vx-ddopt.sel i { background: #ff3b30; color: #fff; }
.vx-ddopt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-ddopt svg { width: 16px; height: 16px; stroke: #ff8a80; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.vx-owner em { font-style: normal; font-size: 11.5px; color: #ffd28a; padding: 3px 9px; border-radius: 999px; background: rgba(245, 165, 36, .12); }
#visits-view.vx-ro .vx-own { display: none !important; }
.vx-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vx-card { background: rgba(20, 9, 10, .68); border: 1px solid var(--aur-line); border-radius: 18px; }
.vx-lbl { font: 800 11px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.vx-empty { padding: 60px 24px; text-align: center; color: rgba(255, 255, 255, .55); font: 600 13px var(--font-ui); }
.vx-empty b { display: block; color: #fff; font: 700 16px var(--font-display); margin-bottom: 6px; }
.vx-link { background: none; border: 0; padding: 0; color: #ff8a80; font: 700 12.5px var(--font-ui); cursor: pointer; text-align: left; }
.vx-link:hover { color: #fff; }
.vx-mk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.vx-mk.site { background: #ff3b30; }
.vx-mk.show { border: 2px solid #f5a524; }
.vx-mk.pl { border: 2px solid #8fd3ff; }

/* calendar */
.vx-cal { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.vx-month { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.vx-mh { display: flex; justify-content: space-between; align-items: center; }
.vx-mh h3 { margin: 0; font: 800 22px var(--font-display); letter-spacing: -.01em; color: #fff; }
.vx-nav { display: flex; gap: 6px; }

/* month / year picker: the title is its button */
.vx-mwrap { position: relative; }
.vx-mbtn { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 -6px -10px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent;
  background: none; color: #fff; font: 800 22px var(--font-display); letter-spacing: -.01em; cursor: pointer; transition: background .15s, border-color .15s; }
.vx-mbtn span { color: rgba(255, 255, 255, .62); font-weight: 700; }
.vx-mbtn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; transition: transform .18s; }
.vx-mbtn:hover { background: rgba(255, 255, 255, .07); border-color: var(--aur-line); }
.vx-mbtn[aria-expanded="true"] { background: rgba(255, 255, 255, .09); border-color: var(--aur-line-strong); }
.vx-mbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.vx-mbtn:focus-visible, .vx-mpm:focus-visible, .vx-mp-y:focus-visible, .vx-mp-today:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vx-mp { position: absolute; top: calc(100% + 12px); left: -10px; z-index: 60; width: 340px; max-width: calc(100vw - 32px); padding: 14px;
  border-radius: 20px; background: #140909; border: 1px solid var(--aur-line-strong);
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .85), 0 0 0 1px rgba(0, 0, 0, .3); animation: vxPop .16s ease-out both; }
/* Movement only, never opacity: a popup must be visible even on its first frame. */
@keyframes vxPop { from { transform: translateY(-6px) scale(.98); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .vx-mp { animation: none; } .vx-mbtn svg { transition: none; } }
.vx-mp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.vx-mp-h b { font: 800 20px var(--font-display); color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.vx-mp-y { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .05); color: #fff; font-size: 18px; cursor: pointer; }
.vx-mp-y:hover { background: rgba(255, 255, 255, .13); }
.vx-mp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vx-mpm { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 11px 9px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .045); color: #fff; cursor: pointer; text-align: left; transition: background .12s, border-color .12s; }
.vx-mpm b { font: 800 14px var(--font-display); }
.vx-mpm small { font: 700 10.5px var(--font-ui); color: rgba(255, 255, 255, .55); white-space: nowrap; }
.vx-mpm.none small { color: rgba(255, 255, 255, .3); }
.vx-mpm:hover { background: rgba(255, 255, 255, .1); border-color: var(--aur-line-strong); }
.vx-mpm.now { border-color: #ff6b5f; }
.vx-mpm.sel { background: #ff3b30; border-color: #ff3b30; }
.vx-mpm.sel small { color: rgba(255, 255, 255, .88); }
.vx-mpm i { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #8fd3ff; box-shadow: 0 0 0 2px rgba(16, 8, 9, .9); }
.vx-mp-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--aur-line); }
.vx-mp-f span { font: 600 12px var(--font-ui); color: rgba(255, 255, 255, .55); }
.vx-mp-today { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .07); color: #fff; font: 700 12.5px var(--font-ui); cursor: pointer; }
.vx-mp-today:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 640px) {
  .vx-mbtn { font-size: 19px; }
  .vx-mp { left: -6px; width: calc(100vw - 32px); }
  .vx-mpm { padding: 9px 8px; }
}
.vx-navb { height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .05); color: #fff; font: 700 12.5px var(--font-ui); cursor: pointer; }
.vx-navb.sq { width: 32px; padding: 0; font-size: 16px; }
.vx-navb:hover { background: rgba(255, 255, 255, .12); }
.vx-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.vx-dow { font: 800 10.5px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); padding-left: 8px; }
.vx-day { border-radius: 11px; background: rgba(255, 255, 255, .035); padding: 7px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.vx-day:hover { background: rgba(255, 255, 255, .07); }
.vx-day.wk { background: rgba(255, 255, 255, .02); }
.vx-day.out { opacity: .3; cursor: default; background: rgba(255, 255, 255, .02); }
.vx-day .n { font: 700 12px var(--font-ui); color: rgba(255, 255, 255, .6); }
.vx-day.today { box-shadow: inset 0 0 0 2px #ff6b5f; }
.vx-day.today .n { align-self: flex-start; background: #ff3b30; color: #fff; border-radius: 999px; padding: 1px 7px; }
#visits-view.vx-ro .vx-day { cursor: default; }
.vx-chip { display: block; width: 100%; text-align: left; padding: 4px 7px; border-radius: 7px; border: 0; font: 700 11.5px var(--font-ui); color: #fff; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.vx-chip.site { background: rgba(255, 59, 48, .18); box-shadow: inset 3px 0 0 #ff3b30; }
.vx-chip.show { background: rgba(245, 165, 36, .15); box-shadow: inset 3px 0 0 #f5a524; }
.vx-chip.pl { background: rgba(120, 190, 255, .16); color: #d6edff; box-shadow: inset 3px 0 0 #8fd3ff; }
.vx-chip:hover { filter: brightness(1.25); }
.vx-more { font: 700 11px var(--font-ui); color: rgba(255, 255, 255, .5); padding-left: 4px; }
.vx-foot { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font: 600 12px var(--font-ui); color: rgba(255, 255, 255, .7); }
.vx-foot span { display: inline-flex; align-items: center; gap: 6px; }
.vx-foot .vx-link { margin-left: auto; }
.vx-rail { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.vx-rail .vx-card { padding: 14px 16px; display: flex; flex-direction: column; flex-shrink: 0; }
.vx-rail .vx-lbl { margin-bottom: 4px; }
.vx-li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 9px 4px; border: 0; border-top: 1px solid rgba(255, 255, 255, .06);
  background: none; text-align: left; cursor: pointer; border-radius: 10px; color: inherit; }
.vx-li:hover { background: rgba(255, 255, 255, .05); }
.vx-li > span { min-width: 0; }
.vx-li b { display: block; font: 700 14px var(--font-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-li small { display: block; margin-top: 2px; font: 600 12px var(--font-ui); color: rgba(255, 255, 255, .56); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-dt { text-align: center; line-height: 1; }
.vx-dt b { display: block; font: 800 19px var(--font-display); color: #a9dbff; }
.vx-dt small { font: 700 10px var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.vx-dt.past b { color: #fff; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.vx-dt.past small { display: block; margin-top: 2px; }
.vx-none { padding: 10px 4px 2px; font: 600 12.5px var(--font-ui); color: rgba(255, 255, 255, .5); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vx-rail .vx-card > .vx-link { margin: 10px 4px 2px; }

/* table: rows with a date tile, pinned month headers (restyled 2026-12-01) */
.vx-tbl { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.vx-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vx-search { display: flex; align-items: center; gap: 8px; height: 40px; width: 320px; max-width: 100%; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--aur-line); background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .5); transition: border-color .15s, background .15s; }
.vx-search:focus-within { border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .09); }
.vx-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: 500 13.5px var(--font-ui); }
.vx-search input::placeholder { color: rgba(255, 255, 255, .45); }
.vx-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--aur-line); }
.vx-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px; border: 0; background: none; font: 700 12.5px var(--font-ui); color: rgba(255, 255, 255, .72); cursor: pointer; }
.vx-seg button.on { background: #fff; color: var(--aur-ink); }
.vx-seg button i { font-style: normal; min-width: 18px; padding: 0 5px; border-radius: 999px; background: rgba(120, 190, 255, .22); color: #bfe3ff; font-size: 11px; line-height: 18px; text-align: center; }
.vx-seg button.on i { background: #8fd3ff; color: #0b1420; }
.vx-count { margin-left: auto; font: 600 12.5px var(--font-ui); color: rgba(255, 255, 255, .55); }
.vx-count b { color: #fff; font-weight: 800; }
.vx-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.vx-list { padding: 0 0 8px; }
.vx-cols, .vx-row { display: grid; grid-template-columns: 56px minmax(0, 1.5fr) minmax(0, 1fr) 128px 22px; gap: 16px; align-items: center; }
.vx-cols { padding: 12px 20px 8px; font: 800 10.5px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.vx-grp { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px; padding: 14px 20px 8px;
  background: #130809; border-bottom: 1px solid var(--aur-line); }
.vx-grp b { font: 800 15px var(--font-display); color: #fff; letter-spacing: -.005em; }
.vx-grp span { font: 600 12px var(--font-ui); color: rgba(255, 255, 255, .5); }
.vx-grp.pl b { color: #a9dbff; }
.vx-grp.nd b { color: rgba(255, 255, 255, .7); }
.vx-row { margin: 0 8px; padding: 10px 12px; border-radius: 14px; cursor: pointer; outline: none; transition: background .12s; }
.vx-row + .vx-row { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.vx-row:hover, .vx-row:focus-visible { background: rgba(255, 255, 255, .055); box-shadow: none; }
.vx-row:hover + .vx-row, .vx-row:focus-visible + .vx-row { box-shadow: none; }
.vx-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.vx-tile { width: 52px; height: 52px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); line-height: 1; }
.vx-tile b { font: 800 19px var(--font-display); color: #fff; }
.vx-tile b.mo { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.vx-tile small { font: 800 9.5px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.vx-tile.pl { background: rgba(120, 190, 255, .12); border-color: rgba(143, 211, 255, .4); }
.vx-tile.pl b { color: #bfe3ff; }
.vx-tile.none b { color: rgba(255, 255, 255, .4); }
.vx-tile.none small { font-size: 8.5px; letter-spacing: .04em; }
.vx-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vx-main b { font: 700 15px var(--font-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-main small { font: 600 12.5px var(--font-ui); color: rgba(255, 255, 255, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-main em { font-style: normal; color: #a9dbff; }
.vx-where { min-width: 0; display: flex; align-items: center; gap: 7px; font: 600 13px var(--font-ui); color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-where svg { width: 14px; height: 14px; flex-shrink: 0; stroke: rgba(255, 255, 255, .45); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vx-muted { color: rgba(255, 255, 255, .38); }
.vx-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font: 700 12px var(--font-ui); white-space: nowrap; }
.vx-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.vx-pill.site { background: rgba(255, 59, 48, .14); color: #ffb0a9; }
.vx-pill.site::before { background: #ff3b30; }
.vx-pill.show { background: rgba(245, 165, 36, .13); color: #ffd28a; }
.vx-pill.show::before { border: 2px solid #f5a524; width: 5px; height: 5px; }
.vx-pill.pl { background: rgba(120, 190, 255, .14); color: #bfe3ff; }
.vx-pill.pl::before { border: 2px solid #8fd3ff; width: 5px; height: 5px; }
.vx-pill.none { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .5); }
.vx-pill.none::before { background: rgba(255, 255, 255, .3); }
.vx-chev { display: flex; align-items: center; justify-content: center; }
.vx-chev svg { width: 16px; height: 16px; stroke: rgba(255, 255, 255, .3); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .12s, stroke .12s; }
.vx-row:hover .vx-chev svg { stroke: #fff; transform: translateX(2px); }
.vx-list mark { background: rgba(255, 210, 138, .28); color: #fff; border-radius: 3px; padding: 0 1px; }
@media (max-width: 1000px) {
  .vx-cols { display: none; }
  .vx-cols, .vx-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; }
  .vx-where, .vx-chev { display: none; }
}
@media (max-width: 640px) {
  .vx-row { grid-template-columns: 48px minmax(0, 1fr); margin: 0 4px; padding: 10px 8px; }
  .vx-tile { width: 46px; height: 46px; }
  .vx-pillcell { grid-column: 2; margin-top: -2px; }
  .vx-grp { padding: 12px 14px 8px; }
}

/* map (Tripp, 2026-12-01): the Otto Fire Map tab's look, full bleed in the card,
   controls and legend floating over it. Pins are app.css's .ember, scaled per map. */
.mx-card { position: relative; padding: 0; overflow: hidden; min-height: 0; }
.mx-map { position: absolute; inset: 0; background: #06080f; }
.mx-top { position: absolute; top: 12px; left: 62px; right: 12px; z-index: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.mx-top > * { pointer-events: auto; }
.mx-pill { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(16, 8, 9, .86); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mx-pill button { border: 0; background: none; color: rgba(255, 255, 255, .72); font: 700 12.5px var(--font-ui); padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.mx-pill button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.mx-pill button.on { background: #fff; color: #170b0c; }
.mx-pill .sq { width: 30px; padding: 6px 0; font-size: 16px; line-height: 1; }
.mx-period { font: 800 15px var(--font-display); color: #fff; padding: 0 8px 0 12px; white-space: nowrap; }
.mx-legend { position: absolute; bottom: 22px; left: 12px; right: 12px; width: max-content; max-width: calc(100% - 24px); z-index: 600; display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap;
  border-radius: 18px; padding: 9px 16px; background: rgba(16, 8, 9, .82); border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 4px 20px rgba(0, 0, 0, .4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.mx-legend .legend-entry { font-size: 11.5px; }
.mx-legend .legend-entry svg { width: 15px; height: 15px; flex-shrink: 0; }
.mx-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 500; padding: 10px 18px; border-radius: 999px;
  background: rgba(16, 8, 9, .86); border: 1px solid rgba(255, 255, 255, .2); font: 700 13px var(--font-ui); color: rgba(255, 255, 255, .8); white-space: nowrap; }
.mx-card .leaflet-control-zoom { margin-left: 12px !important; margin-top: 12px !important; }
.mx-card .ember .mx-n { position: absolute; top: -6px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fff; color: #170b0c;
  font: 800 10.5px/17px var(--font-ui); text-align: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.mx-card .ember.approx svg { opacity: .75; }
.mx-pvs { max-height: 260px; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.mx-pv { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 7px 4px; border-top: 1px solid rgba(255, 255, 255, .06); border-radius: 8px; cursor: pointer; outline: none; }
.mx-pv:hover, .mx-pv:focus-visible { background: rgba(255, 255, 255, .06); }
.mx-pv:focus-visible { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.mx-pv .vx-dt b { font-size: 16px; }
.mx-pv > span { min-width: 0; }
.mx-pv span b { display: block; font: 700 12.5px var(--font-ui); color: rgba(255, 255, 255, .95); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-pv span small { display: block; font: 500 11px var(--font-ui); color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-place { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 9px 4px; border: 0;
  border-top: 1px solid rgba(255, 255, 255, .06); background: none; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.mx-place:hover { background: rgba(255, 255, 255, .06); }
.mx-place .ic { width: 26px; height: 26px; display: grid; place-items: center; }
.mx-place .ic svg { width: 24px; height: 24px; }
.mx-place > span:nth-child(2) { min-width: 0; }
.mx-place b { display: block; font: 700 14px var(--font-display); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-place small { display: block; margin-top: 2px; font: 600 12px var(--font-ui); color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-place em { font: 700 11.5px var(--font-ui); font-style: normal; color: rgba(255, 255, 255, .5); text-align: right; white-space: nowrap; }
.mx-place em i { display: block; font-style: normal; color: #fff; font-size: 13px; }
.mx-noplace { margin-top: 10px; }
@media (max-width: 1000px) {
  .mx-card { height: 62vh; min-height: 380px; }
}
@media (max-width: 640px) {
  .mx-top { left: 58px; right: 8px; top: 10px; }
  .mx-legend { bottom: 12px; left: 8px; padding: 7px 12px; gap: 6px 12px; }
  .mx-legend .legend-entry { font-size: 11px; }
}

/* details */
.vx-detail { display: flex; flex-direction: column; gap: 14px; max-width: 640px; overflow-y: auto; min-height: 0; }
.vx-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .07); color: #fff; font: 700 13px var(--font-ui); cursor: pointer; }
.vx-back:hover { background: rgba(255, 255, 255, .13); }
.vx-dcard { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.vx-dcard h3 { margin: 0; font: 800 28px/1.1 var(--font-display); letter-spacing: -.02em; color: #fff; }
.vx-dcard dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0; font: 600 14px var(--font-ui); }
.vx-dcard dt { color: rgba(255, 255, 255, .5); }
.vx-dcard dd { margin: 0; color: #fff; white-space: pre-wrap; }
.vx-also { border-top: 1px solid var(--aur-line); padding-top: 12px; }
.vx-also .vx-li { grid-template-columns: minmax(0, 1fr); }
.vx-dfoot { display: flex; gap: 10px; padding-top: 6px; }

/* form: a popup in the middle of the screen (Grant, 2026-12-01: "a popup in the middle
   of the screen vs the right side bar"). Hidden with visibility, so it takes no clicks closed. */
.vv-scrim { position: fixed; inset: 0; z-index: 3000; background: rgba(4, 2, 3, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: none; }
.vv-scrim.open { display: block; }
.vv-drawer { position: fixed; top: 50%; left: 50%; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); z-index: 3001;
  background: var(--aur-panel-strong); border: 1px solid var(--aur-line-strong); border-radius: 22px; padding: 26px 28px 20px;
  display: flex; flex-direction: column; gap: 16px; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 40px 100px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .03);
  transform: translate(-50%, -47%) scale(.97); opacity: 0; visibility: hidden;
  transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s; }
.vv-drawer.open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; transition: transform .2s ease, opacity .2s ease, visibility 0s; }
/* Cancel / Save stay pinned to the popup's bottom edge when the form scrolls (a phone). */
.vv-drawer .vv-dfoot { position: sticky; bottom: -20px; z-index: 2; margin: auto -28px -20px; padding: 14px 28px 20px; background: var(--aur-panel-strong); }
@media (max-width: 640px) {
  .vv-drawer { padding: 22px 18px 16px; border-radius: 20px; max-height: calc(100dvh - 32px); }
  .vv-drawer .vv-dfoot { bottom: -16px; margin: auto -18px -16px; padding: 12px 18px 16px; }
}
.vv-drawer h3 { font: 700 26px var(--font-display); letter-spacing: -.02em; color: #fff; margin: 6px 0 0; }
.vv-drawer .hub-lbl { display: block; }
.vv-x { position: absolute; top: 22px; right: 22px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 0; color: #fff; cursor: pointer; }
.vv-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.vv-f label { display: block; font: 700 10.5px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-bottom: 7px; }
.vv-inp { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .05); color: #fff;
  padding: 0 14px; font: 600 14px var(--font-ui); outline: none; color-scheme: dark; }
.vv-inp::placeholder { color: rgba(255, 255, 255, .36); }
.vv-inp:focus { border-color: #ff6b5f; box-shadow: 0 0 0 3px rgba(255, 59, 48, .22); }
textarea.vv-inp { height: 72px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
select.vv-inp option { background: #170b0c; }
.vv-typesel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vv-typesel button { text-align: left; border-radius: 14px; border: 1px solid var(--aur-line-strong); padding: 12px 14px; background: rgba(255, 255, 255, .04); color: #fff; cursor: pointer; font-family: var(--font-ui); }
.vv-typesel button b { display: flex; align-items: center; gap: 8px; font: 700 14px var(--font-display); }
.vv-typesel button small { display: block; margin-top: 3px; font-size: 11.5px; color: rgba(255, 255, 255, .55); font-weight: 600; }
.vv-typesel button.on { border-color: #ff6b5f; background: rgba(255, 59, 48, .12); }
.vv-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--aur-line); margin-bottom: 8px; }
.vv-seg button { padding: 6px 13px; border-radius: 999px; font: 700 12.5px var(--font-ui); color: rgba(255, 255, 255, .72); background: none; border: 0; cursor: pointer; }
.vv-seg button.on { background: rgba(255, 255, 255, .16); color: #fff; }
.vv-mopick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.vv-mopick button { padding: 8px 0; border-radius: 10px; font: 700 12.5px var(--font-ui); background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .78); border: 0; cursor: pointer; }
.vv-mopick button:hover { background: rgba(255, 255, 255, .1); }
.vv-mopick button.on { background: #ff3b30; color: #fff; }
.vv-hint { margin-top: 6px; font: 600 11.5px var(--font-ui); color: rgba(255, 255, 255, .45); }
.vv-when { display: flex; align-items: center; gap: 8px; margin-top: 10px; font: 600 12.5px var(--font-ui); color: rgba(255, 255, 255, .72); }
.vv-when:empty { display: none; }
.vv-when i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.vv-when.pl i { border: 2px solid #8fd3ff; }
.vv-when.pl b { color: #a9dbff; }
.vv-when.done i { background: #ff3b30; }
.vv-when b { color: #fff; }
.vv-err { display: none; padding: 10px 12px; border-radius: 12px; background: rgba(255, 59, 48, .14); border: 1px solid rgba(255, 107, 95, .4); color: #ffb4ad; font: 600 12.5px var(--font-ui); }
.vv-err.show { display: block; }
.vv-dfoot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--aur-line); }
.vv-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px; font: 700 13px var(--font-ui);
  border: 1px solid var(--aur-line-strong); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.vv-btn.pri { background: #ff3b30; border-color: #ff3b30; }
.vv-btn:disabled { opacity: .55; cursor: default; }
.vv-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 3100; padding: 11px 18px; border-radius: 999px;
  background: var(--aur-panel-strong); border: 1px solid var(--aur-line-strong); color: #fff; font: 600 13px var(--font-ui); transition: all .2s; pointer-events: none; }
.vv-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Home box (Tripp's Home: Visits took the "Due for replacement" spot) */
.hub-vbars { flex: 1; display: flex; align-items: flex-end; gap: 4px; min-height: 64px; margin: 12px 0 2px; }
.hub-vbars .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.hub-vbars .c i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: #ff3b30; min-height: 3px; }
.hub-vbars .c i.lo { opacity: .55; }
.hub-vbars .c i.z { background: rgba(255, 255, 255, .12); }
.hub-vbars .c small { font: 700 9.5px var(--font-ui); color: rgba(255, 255, 255, .55); }
.hub-vbars .c em { font: 800 10px var(--font-ui); font-style: normal; color: #fff; }
.hub-warn { color: #ffd28a; }
.hub-plan { color: #a9dbff; }
@media (max-width: 1100px) { .hub-vbars { flex: none; height: 120px; } }

/* Narrow screens: one column, the page scrolls. */
@media (max-width: 1000px) {
  #visits-view { overflow-y: auto; }
  /* flex: none down the chain, so the page grows and scrolls instead of being squeezed to the screen */
  .vx { height: auto; flex: none; padding: 18px 14px 24px; }
  .vx-body, .vx-cal, .vx-tbl, .vx-scroll { flex: none; }
  .vx-cal { grid-template-columns: minmax(0, 1fr); }
  .vx-month { min-height: 520px; }
  .vx-rail { overflow: visible; }
  .vx-scroll { overflow: visible; }
  .vx-count { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .vx-acts { width: 100%; }
  .vx-acts .vx-btn { flex: 1; }
  .vx-switch { width: 100%; }
  .vx-switch button { flex: 1; justify-content: center; }
  .vx-month { min-height: 440px; padding: 12px 10px; }
  .vx-grid { gap: 3px; }
  .vx-day { padding: 4px; }
  .vx-chip { font-size: 10px; padding: 2px 4px; }
  .vx-dow { padding-left: 2px; font-size: 9px; }
  .vx-search { width: 100%; }
}
