/* ═══════════════════════════════════════════════════════════════════
   Service categories — compact collapse-by-default rows
   Each service is a one-line row; the name-override + Common-issues
   editor is hidden until the row's hidden checkbox (.svc-expand) is
   checked via its chevron label. No <details> (it would steal the
   drag-handle / ios-switch / Save clicks) and no new JS.
   ═══════════════════════════════════════════════════════════════════ */

/* Tight one-line rows. The custom head is display:grid (5 fixed cols) in
   the legacy bento rules; the compact row adds a pill, a preview, and a
   chevron, so force BOTH heads to flex and let them lay out in source order. */
.admin-body #service-list .service-row,
.admin-body #cs-list .service-row--custom { padding: 8px 12px; }
.admin-body #service-list .service-row .service-row-head,
.admin-body #cs-list .service-row--custom .service-row-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 0;
  min-height: 40px;
}

/* HCP rows render as a flat hairline roster, not a card per row. */
.admin-body #service-list { display: flex; flex-direction: column; }
.admin-body #service-list .service-row {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--sw-border);
  border-radius: 0;
  margin: 0;
}
.admin-body #service-list .service-row:last-of-type { border-bottom: 0; }

/* Name sizes to content (with a ceiling); the preview fills the rest. */
.admin-body #service-list .service-row-name,
.admin-body #cs-list .service-row--custom .service-row-name {
  flex: 0 1 auto;
  max-width: 260px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Collapse-by-default: hide the editor grid until the row is expanded. */
.admin-body #service-list .service-row .service-row-grid,
.admin-body #cs-list .service-row--custom .service-row-grid { display: none; }
.admin-body #service-list .service-row > .svc-expand:checked ~ .service-row-grid { display: grid; margin-top: 12px; }
.admin-body #cs-list .service-row--custom > .svc-expand:checked ~ form .service-row-grid { display: grid; margin-top: 12px; }

/* One-line "common issues" preview — trailing muted hint. */
.admin-body .svc-row__preview {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  color: var(--sw-muted);
  font-size: 0.82rem;
}
@media (max-width: 760px) { .admin-body .svc-row__preview { display: none; } }

/* Expand chevron (the label that flips the hidden checkbox). */
.admin-body .svc-row__expand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--sw-muted);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}
.admin-body .svc-row__expand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s;
}
.admin-body .svc-row__expand:hover { background: var(--sw-card-lift, #FFFDF9); color: var(--sw-ink); }
.admin-body #service-list .service-row > .svc-expand:checked ~ .service-row-head .svc-row__expand::before,
.admin-body #cs-list .service-row--custom > .svc-expand:checked ~ form .service-row-head .svc-row__expand::before { transform: rotate(-135deg); }

/* Visible/Hidden pill pair — driven by .is-hidden (the toggle flips it). */
.admin-body .service-row--hcp .svc-vis-hidden { display: none; }
.admin-body .service-row--hcp.is-hidden .svc-vis-visible { display: none; }
.admin-body .service-row--hcp.is-hidden .svc-vis-hidden { display: inline-flex; }

/* Search field + HCP empty state. */
.admin-body .svc-search-wrap { margin: 0 0 12px; }
.admin-body #service-search { width: 100%; }
.admin-body .svc-empty-state {
  padding: 18px;
  text-align: center;
  color: var(--sw-muted);
  background: var(--sw-card-lift, #FFFDF9);
  border: 1px dashed var(--sw-border);
  border-radius: 16px;
  font-size: 0.9rem;
}

.admin-body .tag-editor-tag {
  background: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border);
  color: var(--sw-ink);
}

.admin-body .tag-editor-remove:hover,
.admin-body .tag-editor-remove:focus-visible {
  background: var(--sw-orange-soft);
  color: var(--sw-orange-dark);
}

.admin-body .attribution-row,
.admin-body .attribution-loc-row {
  border-color: var(--sw-border);
}

.admin-body .attribution-bar {
  background: var(--sw-card-lift, #FFFDF9);
}

.admin-body .attribution-bar-fill {
  background: var(--sw-orange);
}

/* ─── Per-location performance table (Marketing tab) ──────────────
   One row per configured location with sessions, conversion %,
   abandonment %, per-step drop counts, and top lead source. Powered
   by perLocationStats from the dashboard route handler. Drill-down:
   clicking a non-current location's name switches dashboards via
   ?location=. */
.per-loc-table-wrap {
  overflow-x: auto;
  margin: 0 -8px;
}
.per-loc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}
.per-loc-table thead th {
  text-align: left;
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sw-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--sw-border);
  background: transparent;
  vertical-align: bottom;
  white-space: nowrap;
}
.per-loc-table thead .per-loc-th-group {
  text-align: center;
  border-left: 1px solid var(--sw-border);
  border-right: 1px solid var(--sw-border);
}
.per-loc-subhead th {
  font-size: 0.68rem !important;
  letter-spacing: 0.06em !important;
  font-weight: 600 !important;
  text-align: center !important;
  color: var(--sw-muted);
  padding: 4px 6px !important;
  text-transform: none !important;
}
.per-loc-subhead th span {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--sw-muted);
  opacity: 0.75;
  letter-spacing: 0.04em;
  white-space: normal;
  max-width: 90px;
  margin-top: 2px;
  line-height: 1.15;
}
.per-loc-row td {
  padding: 12px;
  border-bottom: 1px solid var(--sw-border);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: var(--sw-ink);
}
.per-loc-row:last-child td { border-bottom: 0; }
.per-loc-row.is-selected td { background: rgba(243, 138, 63, 0.05); }
.per-loc-name { font-weight: 500; }
.per-loc-name a {
  color: var(--sw-ink-deep, #373B4D);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease;
}
.per-loc-name a:hover { border-bottom-color: var(--sw-orange); }
.per-loc-here-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(243, 138, 63, 0.15);
  color: var(--sw-orange-dark, #B86012);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.per-loc-num,
.per-loc-step,
.per-loc-source {
  text-align: center;
}
.per-loc-source { text-align: left; }
.per-loc-num strong,
.per-loc-step strong,
.per-loc-source strong {
  font-weight: 700;
  color: var(--sw-ink-deep, #373B4D);
}
.per-loc-pct {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.78rem;
  color: var(--sw-muted);
}
.per-loc-step.is-worst {
  background: rgba(243, 138, 63, 0.10);
  border-radius: 6px;
}
.per-loc-step.is-worst strong { color: var(--sw-orange-dark, #B86012); }
.per-loc-step.is-zero { color: var(--sw-muted); }
.per-loc-foot { margin: 12px 0 0; font-size: 0.78rem; }

/* ─── Empty-slot capacity report (Marketing tab) ──────────────────
   Per-location measurement of unbooked tech-slots. Pickers up top,
   KPI tiles for the headline numbers, then per-tech bars and a
   per-day bar strip. Lazy-loaded one month at a time. */
.empty-slots-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.empty-slots-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sw-muted);
  margin-bottom: 6px;
}
.empty-slots-loc {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}
.empty-slots-loc select {
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--sw-ink);
}
.empty-slots-months-wrap { flex: 1; min-width: 280px; }
.empty-slots-months {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.empty-slots-month-btn {
  appearance: none;
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--sw-ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.empty-slots-month-btn:hover {
  border-color: var(--sw-orange);
  background: #FFFDF9;
}
.empty-slots-month-btn.is-active {
  background: var(--sw-orange);
  border-color: var(--sw-orange);
  color: #fff;
  font-weight: 700;
}
.empty-slots-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 6px 0 12px;
}
.empty-slots-kpi {
  background: var(--sw-card);
  border: 1px solid var(--sw-border);
  border-radius: 14px;
  padding: 14px 16px;
}
.empty-slots-kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #373B4D;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.empty-slots-kpi-label {
  font-size: 0.74rem;
  color: var(--sw-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.empty-slots-meta { margin: 4px 0 16px; font-size: 0.84rem; }
.empty-slots-section-h {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sw-muted);
  margin: 18px 0 8px;
}
.empty-slots-tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.empty-slots-tech-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr minmax(160px, auto);
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.empty-slots-tech-name {
  font-weight: 600;
  color: var(--sw-ink);
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* "started Apr 17" pill — flagged on techs whose first job in the
   analyzed month wasn't day 1 (new hires, mid-month van starts).
   Soft warm chip so it reads as informational, not alarming. */
.empty-slots-tech-started {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(243, 138, 63, 0.12);
  color: var(--sw-orange-dark, #B86012);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: help;
}
.empty-slots-tech-bar {
  height: 8px;
  background: var(--sw-card-lift, #FFFDF9);
  border-radius: 999px;
  overflow: hidden;
}
.empty-slots-tech-bar span {
  display: block;
  height: 100%;
  background: var(--sw-orange);
  border-radius: 999px;
}
.empty-slots-tech-nums {
  font-size: 0.86rem;
  color: var(--sw-ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.empty-slots-tech-nums strong { color: #373B4D; font-weight: 700; }
.empty-slots-day-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 4px;
}
.empty-slots-day {
  position: relative;
  height: 72px;
  background: var(--sw-card-lift, #FFFDF9);
  border-radius: 6px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.empty-slots-day.is-closed { opacity: 0.4; }
.empty-slots-day-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sw-orange);
  opacity: 0.85;
}
.empty-slots-day-num {
  position: relative;
  z-index: 1;
  font-size: 0.66rem;
  color: var(--sw-muted);
  font-weight: 600;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
@media (max-width: 600px) {
  .empty-slots-tech-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .empty-slots-tech-nums { text-align: left; }
}

.admin-body .all-locations-table {
  min-width: 0;
}

.admin-body .all-locations-row {
  border-radius: 18px;
}

.admin-body .all-locations-cell--action .bento-btn {
  max-width: 100%;
  white-space: nowrap;
}

.admin-body .bento-card-head,
.admin-body .card2-header,
.admin-body .activity-row,
.admin-body .dropoff-row-head {
  min-width: 0;
}

.admin-body .bento-card-title-row > div,
.admin-body .card2-header > div:first-child {
  min-width: 0;
}

.admin-body .bento-card-title,
.admin-body .card2-header h3 {
  overflow-wrap: anywhere;
}

.admin-body .activity-filter {
  background: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border);
  max-width: 100%;
  overflow-x: auto;
}

.admin-body .activity-filter-btn {
  color: var(--sw-muted);
  white-space: nowrap;
}

.admin-body .activity-filter-btn.is-active {
  background: var(--sw-card);
  color: var(--sw-ink-deep);
}

.admin-body .activity-item {
  background: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border);
  border-radius: 18px;
  box-shadow: none;
}

.admin-body .activity-summary-row,
.admin-body .activity-decision,
.admin-body .activity-details {
  border-color: var(--sw-border);
}

.admin-body .dropoff-card {
  margin-bottom: 18px;
}

.admin-body .dropoff-row {
  background: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border);
  border-radius: 18px;
}

.admin-body .audit-control-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.7fr) auto;
  gap: 14px;
  align-items: end;
}

.admin-body .audit-run-btn {
  min-height: 48px;
  white-space: nowrap;
}

.admin-body .bento-status-line {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--sw-muted);
}

.admin-body .audit-result-wrap {
  margin-top: 18px;
}

.admin-body .audit-summary,
.admin-body .audit-day {
  background: var(--sw-card);
  border-color: var(--sw-border);
  border-radius: 20px;
  box-shadow: 0 8px 24px var(--sw-shadow);
}

.admin-body .audit-slot {
  background: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border);
  border-radius: 16px;
}

.admin-body .audit-slot.is-empty {
  background: var(--sw-coral-wash);
  border-color: rgba(214, 95, 79, 0.28);
}

.admin-body .audit-count-free,
.admin-body .audit-stat-full {
  background: rgba(75, 170, 120, 0.16);
  color: #2F7A52;
}

.admin-body .audit-count-busy,
.admin-body .audit-stat-closed {
  background: var(--sw-card-lift, #FFFDF9);
  color: var(--sw-muted);
  border-color: var(--sw-border);
}

.admin-body .audit-stat-partial {
  background: rgba(211, 154, 46, 0.16);
  color: var(--sw-orange-dark, #C66518);
}

.admin-body .audit-stat-empty {
  background: var(--sw-coral-wash);
  color: var(--sw-coral);
}

.admin-body .account-card {
  grid-column: span 8;
}

.admin-body .account-field-grid {
  display: grid;
  gap: 16px;
}

.admin-body .account-field-help {
  display: block;
  margin-top: 6px;
}

.admin-body .probe-page .btn,
.probe-body .probe-actions .btn {
  min-height: 38px;
}

@media (max-width: 920px) {
  .admin-body .admin-shell {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .admin-body .admin-nav.admin-nav-v3 {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    flex-direction: column;
    border-right: 1px solid var(--sw-border);
    border-bottom: 1px solid var(--sw-border);
  }

  .admin-body .admin-nav-v3 .admin-nav-group {
    flex-direction: column;
  }

  .admin-body .admin-nav-v3 .admin-nav-eyebrow {
    display: block;
  }

  .admin-body .card2-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-body .card2-header-meta {
    justify-content: flex-start;
  }

  .admin-body .all-locations-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }

  .admin-body .all-locations-cell {
    justify-content: space-between;
    gap: 12px;
  }

  .admin-body .all-locations-cell::before {
    flex: 0 0 auto;
  }

  .admin-body .all-locations-cell--name {
    justify-content: flex-start;
  }

  .admin-body .all-locations-cell--name::before {
    display: none;
  }
}

@media (max-width: 760px) {
  .admin-body .admin-shell {
    padding: 14px;
  }

  .admin-body .admin-content {
    padding-bottom: 96px;
  }

  .admin-body .card2-header,
  .admin-body .card2-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .admin-body .bento-card-head,
  .admin-body .card2-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-body .audit-control-grid {
    grid-template-columns: 1fr;
  }

  .admin-body .account-card {
    grid-column: span 12;
  }

  .admin-body .save-bar-label {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .admin-body .stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-body .copy-row,
  .admin-body .bento-link-row {
    align-items: stretch;
  }

  .admin-body .copy-btn,
  .admin-body .bento-link-row .bento-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-body .all-locations-cell {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-body .all-locations-cell--name {
    flex-direction: row;
    align-items: center;
  }
}

/* ═══ Workspace switcher (top-left header pill, HCP-style) ═══
   Compact pill trigger that sits between the brand and the header
   actions. Opens a card dropdown listing the org + every location
   with a search field. Replaces the older sidebar-based location
   picker; the sidebar version is hidden via .admin-nav-group--locations
   { display: none } below so existing wiring (add-location popover
   anchor) stays in place but doesn't render. */
.workspace-switcher {
  position: relative;
  /* Pin the location picker to the LEFT content edge so its left edge lines up
     with the sidebar menu card below (both containers share max-width 1240 +
     24px padding). order:-1 keeps it leftmost even if the brand renders in
     normal flow; margin-right:auto pushes the profile cluster to the right. */
  order: -1;
  margin-left: 0;
  margin-right: auto;
}
.workspace-switcher > summary {
  list-style: none;
  cursor: pointer;
}
.workspace-switcher > summary::-webkit-details-marker { display: none; }
.workspace-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  background: #FFFFFF;
  border: 1px solid #D8DCE3;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sw-ink, #373B4D);
  font-family: inherit;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  white-space: nowrap;
}
.workspace-switcher-trigger:hover {
  border-color: #9CA3AF;
  background: #F8FAFC;
}
.workspace-switcher[open] > .workspace-switcher-trigger {
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.18);
}
.workspace-switcher-trigger-caret {
  flex: 0 0 10px;
  color: #6B7280;
  transition: transform 0.18s ease;
}
.workspace-switcher[open] .workspace-switcher-trigger-caret {
  transform: rotate(180deg);
}

/* Panel — white card with shadow, anchored under the trigger. Width
   is fixed-ish so the search field has room without resizing as the
   user types. */
.workspace-switcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 340px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 8px;
  animation: workspaceSwitcherIn 0.18s ease-out;
}
@keyframes workspaceSwitcherIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-switcher-panel { animation: none; }
}

/* Rows — uniform layout for org / location / +new. Avatar on the
   left, name in the middle, optional pill (Default / Current) on the
   right. The is-current state gets a soft blue wash; hover gets a
   warm gray. */
.workspace-switcher-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--sw-ink, #373B4D);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.workspace-switcher-row:hover { background: #F3F4F6; }
.workspace-switcher-row.is-current {
  background: #EFF6FF;
  color: #373B4D;
}
.workspace-switcher-row.is-current:hover { background: #DBEAFE; }
.workspace-switcher-row--org {
  font-weight: 600;
}

.workspace-switcher-avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #E5E7EB;
  color: #4B5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.workspace-switcher-row.is-current .workspace-switcher-avatar {
  background: #BFDBFE;
  color: #1E40AF;
}
.workspace-switcher-avatar--add {
  background: transparent;
  border: 1.5px dashed #9CA3AF;
  color: #6B7280;
  font-size: 1.15rem;
  font-weight: 400;
}
.workspace-switcher-row-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-switcher-current-pill,
.workspace-switcher-default-pill {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.workspace-switcher-current-pill {
  background: #DBEAFE;
  color: #1E40AF;
}
.workspace-switcher-default-pill {
  background: #F1ECDC;
  color: #6B6555;
}

/* Search — inline icon + input. No border on the input itself; the
   wrapper carries the visual frame so the icon sits "inside" the
   field naturally. */
.workspace-switcher-search-wrap {
  position: relative;
  margin: 8px 4px 6px;
}
.workspace-switcher-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  pointer-events: none;
}
.workspace-switcher-search {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--sw-ink, #373B4D);
  background: #FFFFFF;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.workspace-switcher-search::placeholder { color: #9CA3AF; }
.workspace-switcher-search:focus {
  outline: none;
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.18);
}

.workspace-switcher-list {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  /* Locations nest as children of the org ("Super Admin") row above:
     indented a step in, with a thin guide line running down the left
     like a tree branch so the hierarchy reads at a glance. */
  margin: 2px 0 0 18px;
  padding-left: 8px;
  border-left: 1.5px solid #E8E5DC;
}
.workspace-switcher-empty {
  margin: 8px;
  padding: 16px 12px;
  text-align: center;
  color: #9CA3AF;
  font-size: 0.85rem;
}
.workspace-switcher-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 6px 4px;
}

/* Hide the old sidebar-based picker now that the workspace switcher
   in the header is the single source of truth. Keeping the markup in
   place (rather than ripping it out) so the existing add-location
   popover anchor still has its target — the workspace switcher
   delegates the "+ New Location" click to the same trigger. */
.admin-body .admin-nav-group--locations { display: none; }

/* ═══════ Site map (footer trigger + modal) ═══════
   Additive UI: a footer button that opens a modal listing every admin
   destination, including pages the scope filter currently hides. */
.admin-page-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 40px 0 8px;
  padding: 18px 4px 4px;
  border-top: 1px solid #E8E5DC;
}
.admin-sitemap-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #4A4A44;
  background: #FFFFFF;
  border: 1px solid #DDD9CE;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-sitemap-trigger:hover { background: #F4F2EB; border-color: #C9C4B5; color: #2B2B27; }
.admin-sitemap-trigger-icon { display: inline-flex; color: #8A8675; }
.admin-page-footer-meta { font-size: 12px; color: #9A9685; }

/* Overlay */
.sitemap-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 20px 40px;
  background: rgba(30, 28, 22, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  overflow-y: auto;
  animation: sitemapFade 0.16s ease;
}
.sitemap-overlay[hidden] { display: none; }
@keyframes sitemapFade { from { opacity: 0; } to { opacity: 1; } }
body.sitemap-open { overflow: hidden; }

.sitemap-dialog {
  width: 100%;
  max-width: 880px;
  background: #FBFAF6;
  border: 1px solid #E2DED2;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(40, 36, 26, 0.28);
  padding: 26px 28px 30px;
  animation: sitemapRise 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sitemapRise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sitemap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.sitemap-title { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: #26241D; }
.sitemap-sub { margin: 0; font-size: 13px; color: #8A8675; max-width: 52ch; }
.sitemap-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #6B6657;
  background: #FFFFFF;
  border: 1px solid #DDD9CE;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sitemap-close:hover { background: #F0EEE6; color: #26241D; }

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px 28px;
}
.sitemap-group { min-width: 0; }
.sitemap-group-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #A29D8B;
}
.sitemap-group-note {
  margin-left: 6px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #BBB6A4;
}
.sitemap-links { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sitemap-links a,
.sitemap-linklike {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #3A3830;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.13s ease, color 0.13s ease;
}
.sitemap-links a:hover,
.sitemap-linklike:hover { background: #EFEDE4; color: #1F1D17; }
.sitemap-link-bullet {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  color: #7C7864;
  background: #ECEAE0;
  border-radius: 5px;
}
.sitemap-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5C7A52;
  background: #E7F0E2;
  padding: 1px 6px;
  border-radius: 999px;
}
.sitemap-ext { font-size: 12px; color: #A29D8B; }

@media (max-width: 560px) {
  .sitemap-dialog { padding: 20px 18px 24px; }
  .sitemap-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
}

/* ═══════ Global API Keys tab — API health list ═══════
   Shared row layout for the Google env-key statuses and the per-location
   Housecall Pro health list. Clean two-column rows: label/identity on the
   left, status badge on the right. */
.api-health-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.api-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--sw-border);
}
.api-health-row:last-child { border-bottom: 0; }
.api-health-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  color: var(--sw-ink-deep);
  font-size: 0.95rem;
}
.api-health-loc code {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sw-ink-deep);
  background: #EFECE3;
  padding: 2px 7px;
  border-radius: 6px;
}
/* Key rows stack the env var name over a purpose line. */
.api-health-list--keys .api-health-loc {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.api-health-loc small {
  font-weight: 500;
  color: var(--sw-muted);
  font-size: 0.78rem;
}
.api-health-bullet {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #7C7864;
  background: #ECEAE0;
  border-radius: 7px;
}
.api-health-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.api-health-status .btn-link.btn-sm {
  font-size: 0.82rem;
  padding: 2px 4px;
  white-space: nowrap;
}
/* QuickBooks per-branch class picker. Native <select> chrome doesn't fit the
   Bento system, so strip it and rebuild on tokens: warm card-lift fill, input
   radius, a soft muted chevron, and the house orange focus ring. The disabled
   state (shown until QuickBooks is connected) drops to a quiet inset fill. */
.qbo-class-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 168px;
  padding: 9px 34px 9px 13px;
  border: 1px solid var(--sw-border, #E5DED3);
  border-radius: var(--sw-radius-input, 14px);
  background-color: var(--sw-card-lift, #FFFDF9);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237B8190' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--sw-ink, #373B4D);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.qbo-class-select:hover:not(:disabled) { border-color: var(--sw-muted, #7B8190); }
.qbo-class-select:focus-visible {
  outline: none;
  border-color: transparent;
  box-shadow: var(--sw-focus-shadow, 0 0 0 1px #F38A3F, 0 6px 13px rgba(243, 138, 63, 0.30));
}
.qbo-class-select:disabled {
  cursor: not-allowed;
  color: var(--sw-muted, #7B8190);
  background-color: var(--sw-card-lift, #FFFDF9);
  border-color: var(--sw-border, #E5DED3);
}

/* ═══════ Global API Keys — friendly key list ═══════
   Each key leads with a plain-English name; the env-var name is demoted to a
   subtle inline mono chip in the description, and the right side carries one
   clean status pill (no more repeating the key name). */
.gkey-list { list-style: none; margin: 0; padding: 0; }
.gkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  border-top: 1px solid var(--sw-border);
}
.gkey-row:first-child { border-top: 0; padding-top: 2px; }
.gkey-info { min-width: 0; }
.gkey-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--sw-ink-deep);
}
.gkey-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sw-muted);
  background: var(--sw-card-lift);
  border: 1px solid var(--sw-border);
  padding: 2px 6px;
  border-radius: 999px;
}
.gkey-desc {
  display: block;
  margin-top: 4px;
  color: var(--sw-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.gkey-desc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  color: var(--sw-ink);
  background: var(--sw-card-lift);
  border: 1px solid var(--sw-border);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.gkey-pill { flex: none; white-space: nowrap; }
.gkey-mask {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-left: 6px;
  opacity: 0.65;
  letter-spacing: 0.04em;
}
/* Default view = simple name + status rows only. */
.gkey-row--simple { padding: 12px 2px; }

/* Click-to-reveal technical block (env-var names, masked values, setup). */
.gkey-disclosure { margin-top: 14px; }
.gkey-detail-list { margin: 0; }
.gkey-detail { padding: 10px 0; border-top: 1px solid var(--sw-border); }
.gkey-detail:first-child { border-top: 0; padding-top: 2px; }
.gkey-detail dt { margin: 0 0 4px; }
.gkey-detail dt code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sw-ink-deep);
  background: var(--sw-card-lift);
  border: 1px solid var(--sw-border);
  padding: 2px 7px;
  border-radius: 6px;
}
.gkey-detail dd { margin: 0; color: var(--sw-muted); font-size: 0.85rem; line-height: 1.45; }
.gkey-detail-off { color: var(--sw-muted); font-style: italic; }
.gkey-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.gkey-guide { margin-top: 18px; }
.gkey-guide-title { margin: 0 0 8px; font-size: 0.92rem; color: var(--sw-ink-deep); }
.gkey-guide p { margin: 0 0 10px; color: var(--sw-muted); font-size: 0.86rem; line-height: 1.55; }
.gkey-guide ol { margin: 0 0 10px 18px; line-height: 1.6; color: var(--sw-ink); font-size: 0.86rem; }
.gkey-guide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  background: var(--sw-card-lift);
  border: 1px solid var(--sw-border);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--sw-ink);
}

@media (max-width: 560px) {
  .gkey-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  /* Simple status rows stay on one line (name left, pill right). */
  .gkey-row--simple { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ═══════ Global API keys — collapsed accordion ═══════
   Each key is a closed <details>: just the name + a status pill. Expand a row
   to read the help, see the masked current value, and replace/remove the key. */
.gkey-acc-item { border-top: 1px solid var(--sw-border); }
.gkey-acc-item:first-child { border-top: 0; }
.gkey-acc-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  cursor: pointer;
  list-style: none;
}
.gkey-acc-summary::-webkit-details-marker { display: none; }
.gkey-acc-summary:focus-visible { outline: 2px solid var(--sw-orange); outline-offset: 2px; border-radius: 8px; }
.gkey-acc-chevron {
  display: inline-flex;
  flex: none;
  color: var(--sw-muted);
  transition: transform 0.18s ease;
}
.gkey-acc[open] > .gkey-acc-summary .gkey-acc-chevron { transform: rotate(90deg); }
.gkey-acc-summary .gkey-name { flex: 1; min-width: 0; }
.gkey-acc-summary:hover .gkey-name { color: var(--sw-orange-dark); }
.gkey-acc-status { flex: none; }
.gkey-acc-body { padding: 0 2px 16px 25px; }
@media (max-width: 560px) {
  .gkey-acc-body { padding-left: 2px; }
}

/* ═══════ Service login block (website login above a row's API keys) ═══════
   The vendor/location website-login fields (login link, how you sign in,
   username, password) that sit above the API keys inside an expanded row.
   Native <input>/<select> chrome clashes with the Bento system, so rebuild on
   tokens: a tidy auto-fit grid of warm inputs with the house orange focus, and
   a custom-chevron select that matches the QuickBooks class picker. */
.svc-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.svc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sw-ink-soft, #6B6555);
}
.svc-field input,
.svc-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 13px;
  border: 1px solid var(--sw-border, #E5DED3);
  border-radius: var(--sw-radius-input, 14px);
  background-color: var(--sw-card-lift, #FFFDF9);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--sw-ink, #373B4D);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.svc-field input::placeholder { color: var(--sw-muted, #7B8190); }
.svc-field input:hover,
.svc-field select:hover { border-color: var(--sw-muted, #7B8190); }
.svc-field input:focus,
.svc-field select:focus {
  outline: none;
  border-color: transparent;
  box-shadow: var(--sw-focus-shadow, 0 0 0 1px #F38A3F, 0 6px 13px rgba(243, 138, 63, 0.30));
}
.svc-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237B8190' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
}
/* Login-link field: the URL input and its "Open" link share one row. */
.svc-login-link { display: flex; gap: 6px; align-items: center; }
.svc-login-link input { flex: 1; }
.svc-login-open {
  flex: none;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sw-orange-dark, #C66518);
  text-decoration: none;
}
.svc-login-open:hover { text-decoration: underline; }
/* Credential boxes: the input plus in-field eye + copy icon buttons (replaces
   the old standalone "Reveal" button). Same affordance as the Passwords
   manager — click the eye to reveal the value into the field, the copy to copy
   it. Icons render only when a value is stored. */
.svc-cred { position: relative; display: block; }
.svc-cred input { padding-right: 62px; }
.svc-cred-ics {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}
.svc-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--sw-muted, #7B8190);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.svc-ico-btn:hover { background: var(--sw-orange-soft, #FFEEDC); color: var(--sw-orange-dark, #C66518); }
.svc-ico-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--sw-orange, #F38A3F); }
.svc-ico-btn:disabled { opacity: 0.5; cursor: default; }

/* ═══════ Header profile menu (avatar dropdown) ═══════
   Replaces the old plain "Sign out" button. Native <details> toggle; an
   inline script closes it on outside click. */
.user-menu { position: relative; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  /* No caret anymore — symmetric padding + zero gap keeps the trigger a clean
     circle around the avatar instead of an oblong pill. */
  gap: 0;
  padding: 3px;
  list-style: none;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--sw-border);
  background: #FFFFFF;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-trigger:hover { border-color: #C9C4B5; background: #F6F4ED; }
.user-menu-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sw-ink-deep);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  flex: none;
}
.user-menu-avatar--lg { width: 40px; height: 40px; font-size: 1rem; }
.user-menu-caret { color: var(--sw-muted); }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  width: 264px;
  background: #FFFFFF;
  border: 1px solid var(--sw-border);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(40, 36, 26, 0.22);
  padding: 8px;
  animation: sitemapRise 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.user-menu-id {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 8px 10px;
}
.user-menu-id-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-menu-id-text strong {
  font-size: 0.92rem;
  color: var(--sw-ink-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-id-text small {
  font-size: 0.78rem;
  color: var(--sw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-menu-role {
  align-self: flex-start;
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B6657;
  background: #EFEDE4;
  padding: 1px 7px;
  border-radius: 999px;
}
.user-menu-divider { height: 1px; background: var(--sw-border); margin: 2px 4px 6px; }
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sw-ink);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: background 0.13s ease, color 0.13s ease;
}
.user-menu-item:hover { background: #F3F1E9; color: var(--sw-ink-deep); }
.user-menu-item-icon { display: inline-flex; color: var(--sw-muted); }
.user-menu-item--danger:hover { background: #FBEDE9; color: #B23B2E; }
.user-menu-item--danger:hover .user-menu-item-icon { color: #B23B2E; }

/* ═══════ Account settings section ═══════ */
.account-identity-card { grid-column: 1 / -1; }
.account-card { grid-column: 1 / -1; }
.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.account-identity-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sw-ink-deep);
  color: #FFFFFF;
  font-size: 1.3rem;
  font-weight: 700;
  flex: none;
}
.account-identity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-identity-text strong { font-size: 1.05rem; color: var(--sw-ink-deep); }
.account-identity-text small { font-size: 0.84rem; color: var(--sw-muted); }
.account-identity-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.account-identity-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--sw-muted);
  line-height: 1.5;
}
.account-subhead {
  margin: 20px 0 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #A29D8B;
}
.account-field--wide { grid-column: 1 / -1; }
.account-checks { display: flex; flex-direction: column; gap: 10px; }
.account-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--sw-ink);
  cursor: pointer;
}
.account-check input { width: 16px; height: 16px; flex: none; cursor: pointer; }

/* ════════ Users & Access section (folded into the dashboard) ════════
   Each person is an expandable row; expanding reveals role + technician +
   location editors in one place (replaces the old standalone /admin/users +
   /admin/access pages). Chips are scoped under .user-editor so they don't
   collide with the tag-input .chip component. */
.role-pill {
  display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: #ECE9E0; color: #6B6555; white-space: nowrap;
}
.role-pill--owner          { background: #FBEAD3; color: #B86012; }
.role-pill--admin          { background: #E5EEFB; color: #1F5A86; }
.role-pill--technician     { background: #ECE7FA; color: #5B43B0; }
.role-pill--location_leader{ background: #E7F2EA; color: #2F6B47; }
.role-pill--viewer         { background: #ECE9E0; color: #6B6555; }

/* ── Users & Access — search + grouped People list ─────────────────────────
   The People list is split into collapsible <details> "dropdowns": by type in
   Super Admin (Owner / Admins / Technicians / Other), or per location (Admins /
   Technicians / Not assigned to a location). Collapsed by default so you don't
   face everyone at once; the first non-empty group opens. Rows inside reuse the
   .user-list / .user-item styles below. */
.user-search-wrap { position: relative; margin: 0 0 14px; }
.user-search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--sw-muted, #7B8190); pointer-events: none;
}
.user-search {
  width: 100%; font: inherit; font-size: 0.9rem;
  padding: 10px 12px 10px 36px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9);
  color: var(--sw-ink-deep, #373B4D);
}
.user-search::placeholder { color: var(--sw-muted, #9A9485); }
.user-search:focus { outline: none; border-color: transparent; box-shadow: var(--sw-focus-shadow, 0 0 0 1px #F38A3F, 0 6px 13px rgba(243,138,63,0.30)); }

.user-groups { display: grid; gap: 10px; }
.user-group {
  border: 1px solid var(--sw-border, #ECE5D6); border-radius: 12px;
  background: var(--sw-card, #fff); overflow: hidden;
}
.user-group > summary.user-group-summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 12px 14px; color: var(--sw-ink-deep, #373B4D);
}
.user-group > summary.user-group-summary::-webkit-details-marker { display: none; }
.user-group > summary.user-group-summary:hover { background: var(--sw-card-lift, #FBF8F1); }
.user-group-chev { color: #B5AE9C; display: inline-flex; transition: transform 0.18s ease; }
.user-group[open] > summary .user-group-chev { transform: rotate(90deg); }
.user-group-label { font-weight: 600; font-size: 0.95rem; }
.user-group-sub { font-size: 0.76rem; font-weight: 500; color: var(--sw-muted, #9A9485); }
.user-group-count {
  margin-left: auto; min-width: 22px; text-align: center;
  font-size: 0.76rem; font-weight: 700; color: var(--sw-muted, #6B6555);
  background: var(--sw-card-inset, #F2ECDD); border-radius: 999px; padding: 2px 9px;
}
.user-group .user-list { padding: 0 8px 4px; }
.user-empty--group { font-size: 0.85rem; }
/* Staged-load skeleton + empty/error notice for the grouped container (a <div>
   of <details>, so the row skeleton from 01-shell-forms-tiles.css is re-stated
   here for the new wrapper). */
.user-groups .user-skel {
  height: 52px; border-radius: 12px; border: 1px solid var(--sw-border, #ECE5D6);
  background: linear-gradient(90deg, rgba(0,0,0,0.035) 25%, rgba(0,0,0,0.06) 37%, rgba(0,0,0,0.035) 63%);
  background-size: 400% 100%; animation: avtechSkel 1.3s ease-in-out infinite;
}
.user-groups > .user-empty { padding: 14px 4px; color: var(--sw-muted, #7B8190); }
@media (prefers-reduced-motion: reduce) { .user-groups .user-skel { animation: none; } }

.user-list { list-style: none; margin: 0; padding: 0; }
.user-item { border-bottom: 1px solid var(--sw-border, #ECE5D6); }
.user-item:last-child { border-bottom: 0; }

.user-disclosure summary.user-summary {
  display: grid; align-items: center; gap: 12px; cursor: pointer; list-style: none;
  grid-template-columns: auto minmax(0,1fr) auto minmax(90px,160px) 86px 16px;
  padding: 11px 8px;
}
.user-disclosure summary.user-summary::-webkit-details-marker { display: none; }
.user-disclosure summary.user-summary:hover { background: var(--sw-card-lift, #FBF8F1); }
.user-id { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.user-name { font-weight: 600; color: var(--sw-ink-deep, #373B4D); font-size: 0.95rem; }
.user-email { font: inherit; font-size: 0.8rem; letter-spacing: 0; color: var(--sw-muted, #7B8190); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { font-size: 0.82rem; color: var(--sw-muted, #7B8190); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta-dim { color: #B5AE9C; font-style: italic; }
.user-meta-login { text-align: right; }
.user-chev { color: #B5AE9C; transition: transform 0.18s ease; display: inline-flex; justify-content: center; }
.user-disclosure[open] > summary .user-chev { transform: rotate(180deg); }

.user-editor {
  padding: 6px 4px 20px; display: grid; gap: 16px;
  grid-template-columns: 1fr; max-width: 720px;
}
.user-field { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.user-field-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sw-muted, #6B6555); padding-top: 6px; }
.user-field-control { min-width: 0; }
.user-inline-form { margin: 0; }
.user-field-control select {
  appearance: none; font: inherit; font-size: 0.86rem; padding: 9px 34px 9px 12px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9); color: var(--sw-ink-deep, #373B4D);
  max-width: 100%;
}
.user-field-note { color: #9A9485; font-size: 0.78rem; margin: 6px 0 0; }

/* Owner-set home address — stacked inputs with a City / State / ZIP row, then a
   Save button. Inputs match the select chrome used elsewhere in the row. */
.user-address-form { display: grid; gap: 7px; }
.user-address-form input {
  font: inherit; font-size: 0.86rem; padding: 9px 12px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9);
  color: var(--sw-ink-deep, #373B4D); width: 100%; min-width: 0;
}
.user-address-citystate { display: grid; grid-template-columns: 1fr 70px 92px; gap: 7px; }
.user-address-form .btn { justify-self: start; }
.user-none { color: #9A9485; font-size: 0.82rem; margin: 0 0 8px; }

.user-editor .chip-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.user-editor .chip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--sw-card-lift, #FFFDF9);
  border: 1px solid var(--sw-border, #E5DED3); border-radius: var(--sw-radius-pill, 999px); padding: 6px 7px 6px 12px;
  font-size: 0.85rem; color: var(--sw-ink, #373B4D); justify-content: flex-start;
}
.user-editor .chip-meta { color: var(--sw-muted, #7B8190); font-size: 0.74rem; }
.chip-x-form { margin: 0; display: inline-flex; }
.chip-x { appearance: none; font: inherit; line-height: 1; font-size: 1rem; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--sw-radius-pill, 999px); border: 1px solid var(--sw-coral, #D65F4F); background: var(--sw-card-lift, #FFFDF9); color: var(--sw-coral, #D65F4F); cursor: pointer; }
.chip-x:hover { background: var(--sw-coral-wash, #FCEBE7); }

.user-add-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.user-add-inline select {
  appearance: none; font: inherit; font-size: 0.86rem; padding: 9px 34px 9px 12px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9); color: var(--sw-ink-deep, #373B4D);
}
.user-editor-foot { grid-column: 1 / -1; padding-top: 4px; }
.user-remove {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; cursor: pointer; padding: 0;
  font: inherit; font-size: 0.84rem; font-weight: 600;
  color: var(--sw-coral, #D65F4F);
}
.user-remove:hover { color: #B14535; text-decoration: underline; }
.user-remove-form { margin: 0; }

/* Glassy, schedule-color-tinted avatar in the summary row. Wash + sheen + inner
   highlight read like frosted glass; --ava (set inline from the row's resolved
   color) tints it, falling back to a calm slate. */
.user-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem; letter-spacing: 0.01em;
  color: var(--ava, #5B6472);
  background-color: rgba(123, 129, 144, 0.14);
  background-color: color-mix(in srgb, var(--ava, #7B8190) 17%, transparent);
  background-image: linear-gradient(152deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 58%);
  -webkit-backdrop-filter: blur(5px) saturate(150%);
  backdrop-filter: blur(5px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 3px 8px rgba(55, 59, 77, 0.10);
}

/* Open state: the disclosure becomes a floating two-column console card. */
.user-disclosure[open] {
  background: var(--sw-card, #FCFAF6);
  border: 1px solid var(--sw-border);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(55, 59, 77, 0.07);
  margin: 10px 0;
  overflow: hidden;
}
.user-disclosure[open] > summary.user-summary { padding: 15px 20px; border-bottom: 1px solid var(--sw-border); }
.user-disclosure[open] > summary.user-summary:hover { background: transparent; }
.user-item:has(> .user-disclosure[open]) { border-bottom-color: transparent; }

/* The settings sheet: one calm labelled row per setting, hairline-divided, with
   compact left-aligned controls. Replaces the old two-column console. */
.user-editor.user-sheet { padding: 0; gap: 0; max-width: none; }
.usheet-row {
  display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 18px;
  align-items: start; padding: 15px 22px; border-top: 1px solid var(--sw-hair, #EFEADF);
}
.usheet-row:first-child { border-top: 0; }
.usheet-label {
  font-size: 0.84rem; font-weight: 600; color: var(--sw-ink, #373B4D);
  padding-top: 7px; display: flex; flex-direction: column; gap: 2px;
}
.usheet-sub { font-size: 0.7rem; font-weight: 500; color: var(--sw-muted, #9A9485); }
.usheet-control { min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.usheet-control .user-inline-form { margin: 0; max-width: 100%; }
.usheet-hint { font-size: 0.76rem; color: var(--sw-muted, #9A9485); }
.usheet-readonly { font-size: 0.88rem; color: var(--sw-ink, #373B4D); padding-top: 6px; }
/* Compact, raised controls — selects + single-line inputs share one chrome. */
.user-sheet select,
.user-sheet input[type="tel"],
.user-sheet input[type="text"] {
  appearance: none; font: inherit; font-size: 0.88rem; padding: 9px 12px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9);
  color: var(--sw-ink-deep, #373B4D); max-width: 100%;
}
.user-sheet input[type="tel"] { width: 220px; }
.user-sheet select:focus,
.user-sheet input:focus { outline: none; border-color: var(--sw-orange, #F38A3F); box-shadow: 0 0 0 3px rgba(243, 138, 63, 0.18); }
/* Mailing-address form (shown only when no technician is linked). */
.usheet-control .user-address-form { width: 340px; max-width: 100%; }
.user-sheet .user-address-form input { width: 100%; }

/* Footer: subtle Remove on the left, primary Done on the right. */
.usheet-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; border-top: 1px solid var(--sw-border);
}
.user-foot-spacer { flex: 1; }
.user-done {
  border: 0; background: var(--sw-orange, #F38A3F); color: #fff;
  font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
  padding: 8px 20px; border-radius: 12px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.user-done:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(243, 138, 63, 0.28); }
.user-done:active { transform: none; }

/* One-line helper under the Technician / Locations field labels, clarifying
   what each "Link" actually does (identity vs. access). */
.user-field-help { margin: 0 0 8px; max-width: 430px; line-height: 1.45; }

/* Technician chips carry a home-base row, so they stack vertically (the base
   .chip is inline-flex for the single-line location chips). */
/* The linked technician renders as a calm mini-card: a name row, then the
   schedule color + home base as hairline-divided sub-rows inside it. (Color +
   home base stay nested in .chip--tech — the JS handlers depend on it.) */
.user-editor .chip--tech {
  flex-direction: column; align-items: stretch; gap: 0;
  padding: 0; min-width: 280px; max-width: 360px; overflow: hidden;
  background: var(--sw-card-lift, #FFFDF9); border: 1px solid var(--sw-border, #E5DED3);
  border-radius: var(--sw-radius-input, 14px); color: var(--sw-ink, #373B4D);
}
.user-editor .chip--tech .chip-main {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 12px;
}
.user-editor .chip-name { font-weight: 600; font-size: 0.9rem; }
.user-editor .chip--tech .chip-color-row,
.user-editor .chip--tech .chip-home,
.user-editor .chip--tech .chip-home-editor {
  margin: 0; padding: 11px 12px; border-top: 1px solid var(--sw-hair, #EFEADF);
}
/* Home base — stacked: a label + "Drive start" tag, then the address value and
   its Edit / Clear actions. */
.chip-home { display: block; font-size: 0.8rem; color: var(--sw-ink, #373B4D); }
.chip-home-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.chip-home-title { font-size: 0.72rem; font-weight: 600; color: var(--sw-muted, #7B8190); }
.chip-home-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.66rem; font-weight: 600; color: var(--sw-orange-dark, #C66518);
  background: var(--sw-orange-soft, #FFEEDC); border-radius: 999px; padding: 2px 8px;
}
.chip-home-body { display: flex; align-items: center; gap: 6px; }
.chip-home.is-empty .chip-home-text { color: #9A9485; }
.chip-home-text { min-width: 0; flex: 1; font-size: 0.82rem; color: var(--sw-ink, #373B4D); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-home-actions-inline { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.chip-home-icon { display: inline-flex; color: var(--sw-muted, #7B8190); flex: 0 0 auto; }
.chip-home-edit, .chip-home-clear {
  font: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; flex: 0 0 auto;
  border: 0; background: transparent; padding: 2px 5px; border-radius: 6px; color: #C66518;
}
.chip-home-edit:hover { background: #FFEEDC; }
.chip-home-clear { color: #B14535; }
.chip-home-clear:hover { background: #FCEBE7; }

/* Schedule-color picker in the user editor: the label stacked over the swatches
   with slightly tighter dots so the palette fits the narrow chip column. Reuses
   the shared .tech-color-* swatch component from 01-shell-forms-tiles.css. */
.user-editor .chip-color-row { gap: 6px; flex-direction: column; align-items: flex-start; }
.user-editor .chip-color-row .tech-color-dot { width: 20px; height: 20px; }
.user-editor .chip-color-row .tech-color-label { font-size: 0.72rem; font-weight: 600; color: var(--sw-muted, #7B8190); }
/* Locked state shown when the person has no linked technician: inert, grayed
   swatches (no inputs) plus a one-line hint to link a tech first. */
.user-editor .chip-color-row--disabled { margin-top: 10px; opacity: 0.6; }
.user-editor .chip-color-row--disabled .tech-color-picker { pointer-events: none; }
.user-editor .chip-color-row--disabled .tech-color-dot { filter: grayscale(0.55); cursor: not-allowed; }
.user-editor .chip-color-hint { margin: 1px 0 0; font-size: 0.74rem; color: #9A9485; font-style: italic; }

/* Inline home-base autocomplete editor revealed beneath a tech chip. */
.chip-home-editor { display: flex; flex-direction: column; gap: 6px; }
.chip-home-field { position: relative; }
.chip-home-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.82rem;
  padding: 9px 12px; border-radius: var(--sw-radius-input, 14px); border: 1px solid var(--sw-border, #E5DED3);
  background: var(--sw-card-lift, #FFFDF9); color: var(--sw-ink-deep, #373B4D);
}
.chip-home-input:focus { outline: none; border-color: transparent; box-shadow: var(--sw-focus-shadow, 0 0 0 1px #F38A3F, 0 6px 13px rgba(243, 138, 63, 0.30)); }
.chip-home-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  list-style: none; margin: 0; padding: 4px;
  background: #FCFAF6; border: 1px solid #E5DED3; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(55, 59, 77, 0.12); max-height: 240px; overflow-y: auto;
}
.chip-home-suggest-item { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.chip-home-suggest-item:hover, .chip-home-suggest-item.is-active { background: rgba(243, 138, 63, 0.10); }
.chip-home-suggest-item .sugg-main { font-size: 0.82rem; color: #373B4D; }
.chip-home-suggest-item .sugg-secondary { font-size: 0.72rem; color: var(--sw-muted, #7B8190); }
.chip-home-actions { display: flex; align-items: center; gap: 8px; }

.user-add-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.user-add-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--sw-muted, #6B6555); }
.user-add-field span { font-weight: 600; }
.user-add-field input, .user-add-field select {
  appearance: none; font: inherit; font-size: 0.9rem; padding: 9px 12px; border-radius: var(--sw-radius-input, 14px);
  border: 1px solid var(--sw-border, #E5DED3); background: var(--sw-card-lift, #FFFDF9); color: var(--sw-ink-deep, #373B4D); min-width: 200px;
}

/* ── Add-a-person: bottom-of-group button + pop-up ───────────────────────────
   The button sits as the last row of the Admins/Technicians groups so adding
   someone never means scrolling to the card at the bottom of the page. The
   pop-up (#uadd-modal, rendered once in section-users.ejs) reuses the same
   add form; same scrim/modal recipe as the Passwords pop-up. */
.uadd-row { padding: 8px 4px 12px; }
.uadd-btn { padding: 8px 15px; font-size: 0.84rem; }
.uadd-btn svg { flex-shrink: 0; }

.uadd-scrim[hidden], .uadd-modal[hidden] { display: none !important; }
.uadd-scrim {
  position: fixed; inset: 0; z-index: 1004; background: rgba(55, 59, 77, 0.30);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 180ms ease;
}
.uadd-scrim.is-open { opacity: 1; }
.uadd-modal {
  position: fixed; z-index: 1005;
  top: var(--chrome-top, 54px); right: 0; bottom: var(--chrome-bottom, 24px); left: 0; margin: auto;
  width: min(440px, 94vw); height: fit-content;
  max-height: calc(100vh - var(--chrome-top, 54px) - var(--chrome-bottom, 24px)); overflow: auto;
  background: rgba(255, 253, 249, 0.88);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--sw-border, #E5DED3); border-radius: var(--sw-radius-card, 24px);
  box-shadow: 0 30px 80px rgba(55, 59, 77, 0.26);
  opacity: 0; transform: translateY(8px) scale(0.965);
  transition: opacity 200ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.uadd-modal.is-open { opacity: 1; transform: none; }
.uadd-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 4px; }
.uadd-head > div { flex: 1; min-width: 0; }
.uadd-title { margin: 0; font-size: 1.08rem; font-weight: 800; color: var(--sw-ink-deep, #373B4D); }
.uadd-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--sw-muted, #7B8190); }
.uadd-close { padding: 8px; border-radius: var(--sw-radius-pill, 999px); }
.uadd-modal .uadd-form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 22px 20px; }
.uadd-modal .user-add-field input, .uadd-modal .user-add-field select { min-width: 0; width: 100%; box-sizing: border-box; }
.uadd-modal .bento-btn--primary { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) {
  .uadd-scrim, .uadd-modal { transition: none; }
  .uadd-modal { transform: none; }
}

@media (max-width: 700px) {
  .user-disclosure summary.user-summary { grid-template-columns: auto minmax(0,1fr) auto 16px; }
  .user-meta-login, .user-summary .user-meta:not(.user-meta-login) { display: none; }
  .user-field { grid-template-columns: 1fr; gap: 6px; }
  .user-field-label { padding-top: 0; }
  .usheet-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .usheet-label { padding-top: 0; flex-direction: row; align-items: baseline; gap: 8px; }
  .usheet-foot { padding: 14px 16px; }
}

/* ════════ Horizon floating shell rewrite ════════ */
.admin-legacy-header {
  display: none !important;
}

.admin-body {
  color: var(--sw-ink, #373B4D);
  background:
    radial-gradient(980px 640px at 92% -12%, rgba(191,224,243,0.24), transparent 60%),
    radial-gradient(860px 620px at -12% 112%, rgba(243,138,63,0.10), transparent 58%),
    var(--sw-canvas, #F8F5EF);
}


/* ── Location setup checklist (Settings hub → Location setup card) ──────────
   One row per unfinished per-location setting; rows are tall and airy with a
   status mark left, label + helper middle, and the action pushed right.
   Hydrated by /js/location-setup.js. */
.loc-setup { display: flex; flex-direction: column; }
.loc-setup-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 2px;
}
.loc-setup-row + .loc-setup-row { border-top: 1px solid var(--sw-border, #E5DED3); }
.loc-setup-row.is-settled { opacity: 0.62; }
.loc-setup-mark {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: var(--sw-radius-pill, 999px);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.6px solid var(--sw-border, #E5DED3);
  background: var(--sw-card-lift, #FFFDF9);
  color: transparent;
}
.loc-setup-mark--done {
  border-color: transparent;
  background: var(--sw-green, #4BAA78);
  color: #FFFDF9;
}
.loc-setup-mark--skipped { color: var(--sw-muted, #7B8190); }
.loc-setup-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.loc-setup-main strong { font-size: 13.5px; font-weight: 700; color: var(--sw-ink, #373B4D); }
.loc-setup-main span { font-size: 12px; color: var(--sw-muted, #7B8190); line-height: 1.45; }
.loc-setup-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.loc-setup-actions .loc-setup-go { font-size: 12.5px; padding: 7px 13px; white-space: nowrap; }
.loc-setup-actions .loc-setup-skip { font-size: 12px; padding: 6px 9px; }
.loc-setup-note {
  margin: 4px 2px 6px; font-size: 12.5px; color: var(--sw-muted, #7B8190);
}
.loc-setup-note--complete {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: var(--sw-radius-pill, 999px);
  background: rgba(75, 170, 120, 0.13);
  color: var(--sw-green, #4BAA78); font-weight: 700;
}
@media (max-width: 640px) {
  .loc-setup-row { flex-wrap: wrap; }
  .loc-setup-main { flex-basis: calc(100% - 60px); }
  .loc-setup-actions { margin-left: 40px; }
}
