.geovee-neighborhood-map-wrap {
  max-width: 1280px;
  margin: 28px auto;
  padding: 0 16px;
  position: relative;
}

.geovee-map-shell {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2937;
}

.geovee-map-hero,
.geovee-map-controls-card,
.geovee-map-stage-card,
.geovee-map-sidebar,
.geovee-map-preview-card,
.geovee-map-queue-drawer {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.geovee-map-hero {
  border-radius: 24px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #ffffff 0%, #f7f6ff 100%);
  margin-bottom: 18px;
}

.geovee-map-kicker,
.geovee-map-queue-kicker,
.geovee-map-preview-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  color: #6c4cf1;
  margin-bottom: 10px;
}

.geovee-map-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
}

.geovee-map-hero p {
  margin: 0;
  max-width: 780px;
  font-size: 16px;
  line-height: 1.6;
  color: #5b6475;
}

.geovee-map-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.geovee-map-top-btn,
.geovee-map-fullscreen-btn,
.geovee-job-preview-btn,
.geovee-customer-focus-btn,
.geovee-map-queue-close {
  border-radius: 14px !important;
  min-height: 44px;
  padding: 0 18px !important;
  font-weight: 700 !important;
}

.geovee-map-controls-card {
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 18px;
}

.geovee-map-controls-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.geovee-map-controls-grid label,
.geovee-map-address-search,
.geovee-winback-controls-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.geovee-map-controls-grid label span,
.geovee-map-address-search > span,
.geovee-winback-controls-card label span {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.geovee-map-controls-grid input,
.geovee-map-address-row input,
.geovee-winback-controls-card textarea,
.geovee-winback-controls-card input,
.geovee-customer-card-message textarea {
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  min-height: 46px;
  padding: 10px 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.geovee-map-toggle-card {
  background: #f8fafc;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  padding: 12px 14px;
  min-height: 100%;
}

.geovee-map-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.geovee-map-control-actions {
  display: flex;
  align-items: end;
}

.geovee-map-control-actions .button,
.geovee-map-address-row .button,
.geovee-winback-control-actions .button {
  border-radius: 14px !important;
  min-height: 46px;
  font-weight: 700 !important;
}

.geovee-map-address-search {
  margin-top: 16px;
}

.geovee-map-address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.geovee-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .8fr);
  gap: 18px;
  align-items: start;
}

.geovee-map-stage-card {
  border-radius: 24px;
  padding: 16px;
}

.geovee-map-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.geovee-map-stage-title {
  font-size: 20px;
  font-weight: 800;
}

.geovee-map-stage-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}

.geovee-map-canvas {
  height: 680px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.geovee-map-sidebar {
  border-radius: 24px;
  overflow: hidden;
  min-height: 680px;
  display: flex;
  flex-direction: column;
}

.geovee-map-preview-card {
  margin: 16px 16px 0;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(135deg, #f8f7ff 0%, #ffffff 100%);
}

.geovee-map-preview-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.geovee-map-preview-meta,
.geovee-map-preview-address,
.geovee-map-preview-empty {
  margin-top: 8px;
  color: #5b6475;
  font-size: 14px;
  line-height: 1.5;
}

.geovee-map-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.geovee-map-stat {
  background: #fff;
  border: 1px solid #eceff5;
  border-radius: 16px;
  padding: 10px 12px;
}

.geovee-map-stat span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7b8797;
  margin-bottom: 6px;
}

.geovee-map-stat strong {
  font-size: 18px;
}

.geovee-map-customer-preview-inline {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #eceff5;
}

.geovee-map-customer-preview-inline span,
.geovee-map-customer-preview-inline em {
  color: #5b6475;
  font-size: 13px;
  font-style: normal;
}

.geovee-map-sidebar-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.geovee-map-sidebar-header h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.geovee-map-sidebar-header .sub {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.geovee-map-sidebar-body {
  padding: 18px 20px 22px;
  overflow: auto;
  flex: 1 1 auto;
}

.geovee-map-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.geovee-customer-card {
  border: 1px solid #e7edf5;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.geovee-customer-card.is-focused {
  border-color: #6c4cf1;
  box-shadow: 0 14px 28px rgba(108, 76, 241, 0.16);
  transform: translateY(-1px);
}

.geovee-customer-card-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.geovee-customer-card-main {
  flex: 1;
  min-width: 0;
}

.geovee-customer-card-name-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.geovee-customer-card-meta,
.geovee-customer-card-address {
  margin-top: 6px;
  font-size: 13px;
  color: #5b6475;
  line-height: 1.45;
}

.geovee-customer-card-actions {
  margin-top: 10px;
}

.geovee-customer-card-message {
  margin-top: 12px;
}

.geovee-map-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f0ff;
  color: #5133d7;
  border: 1px solid #ddd4ff;
  font-size: 11px;
  font-weight: 800;
}

.geovee-winback-controls-card {
  border: 1px solid #e7edf5;
  border-radius: 20px;
  background: #f8fafc;
  padding: 16px;
}

.geovee-winback-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.geovee-winback-control-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}


.geovee-winback-action-btn.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}

.geovee-btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: currentColor;
  border-radius: 999px;
  display: inline-block;
  animation: geoveeSpin .8s linear infinite;
}

.geovee-winback-action-btn:not(.button-primary) .geovee-btn-spinner {
  border-color: rgba(209, 33, 92, 0.2);
  border-top-color: currentColor;
}

@keyframes geoveeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.geovee-winback-control-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
  color: #5b6475;
}

.geovee-map-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 9998;
}

.geovee-map-queue-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
}

.geovee-map-queue-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.geovee-map-queue-header h3 {
  margin: 0;
  font-size: 28px;
}

.geovee-map-queue-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 24px;
  background: #fbfcfe;
}

body.geovee-map-drawer-open .geovee-map-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.geovee-map-drawer-open .geovee-map-queue-drawer {
  transform: translateX(0);
}

.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-card,
.geovee-map-stage-card.is-map-fullscreen-active {
  position: fixed !important;
  top: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  left: 12px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 22px !important;
  z-index: 10001 !important;
  display: flex;
  flex-direction: column;
}

.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-canvas,
.geovee-map-stage-card.is-map-fullscreen-active .geovee-map-canvas {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
}

.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-hero,
.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-controls-card,
.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-sidebar {
  visibility: hidden;
}

.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-layout {
  display: block;
}

body.geovee-map-fullscreen-open {
  overflow: hidden;
}

body.geovee-map-fullscreen-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 10000;
}

.geovee-map-legend {
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  line-height: 1.2;
  max-width: 240px;
}

.gv-legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gv-legend-title {
  font-weight: 800;
  letter-spacing: .2px;
}

.gv-legend-toggle {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gv-legend-body { display: block; }
.geovee-map-legend.is-collapsed .gv-legend-body { display: none; }
.gv-legend-group { margin-top: 10px; }
.gv-legend-group-title {
  font-weight: 700;
  font-size: 11px;
  color: #1f2937;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
  opacity: .85;
}

.gv-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.gv-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.geovee-legend-swatch,
.geovee-legend-dot {
  display: inline-block;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.geovee-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.geovee-legend-dot {
  border-radius: 50%;
}

.geovee-legend-dot.dot-xl { width: 18px; height: 18px; }
.geovee-legend-dot.dot-lg { width: 14px; height: 14px; }
.geovee-legend-dot.dot-md { width: 10px; height: 10px; }

.geovee-legend-swatch.sw-green { background: #188038; }
.geovee-legend-swatch.sw-yellow { background: #fbbc04; }
.geovee-legend-swatch.sw-orange { background: #f29900; }
.geovee-legend-swatch.sw-red { background: #d93025; }
.geovee-legend-swatch.sw-cl-green { background: #188038; opacity: 0.5; }
.geovee-legend-swatch.sw-cl-yellow { background: #fbbc04; opacity: 0.5; }
.geovee-legend-swatch.sw-cl-red { background: #d93025; opacity: 0.5; }

.geovee-job-popup {
  min-width: 220px;
}

.geovee-job-popup-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.geovee-job-popup-address {
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 10px;
}

.geovee-job-popup-meta {
  margin-bottom: 10px;
  color: #334155;
  font-size: 13px;
}

.geovee-job-preview-btn {
  width: 100%;
  border: 0;
  background: #6c4cf1;
  color: #fff;
  cursor: pointer;
}

.geovee-job-marker-wrap {
  background: transparent;
  border: 0;
}

.geovee-job-marker-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #6c4cf1;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 14px rgba(108, 76, 241, 0.28);
}

.geovee-job-marker-wrap.is-active .geovee-job-marker-dot {
  box-shadow: 0 12px 20px rgba(108, 76, 241, 0.42);
  transform: scale(1.08);
}

.geovee-job-marker-dot span {
  display: block;
  max-width: 100%;
  padding: 0 2px;
}

.leaflet-interactive.geovee-customer-marker.is-focused {
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.28));
}

@media (max-width: 1180px) {
  .geovee-map-controls-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .geovee-map-layout {
    grid-template-columns: 1fr;
  }

  .geovee-map-sidebar {
    min-height: 0;
  }
}

@media (max-width: 782px) {
  .geovee-neighborhood-map-wrap {
    margin: 18px auto;
    padding: 0 10px;
  }

  .geovee-map-hero,
  .geovee-map-controls-card,
  .geovee-map-stage-card,
  .geovee-map-sidebar {
    border-radius: 18px;
  }

  .geovee-map-hero {
    padding: 18px;
    flex-direction: column;
  }

  .geovee-map-top-actions,
  .geovee-map-control-actions,
  .geovee-winback-control-actions {
    width: 100%;
  }

  .geovee-map-top-actions .button,
  .geovee-map-control-actions .button,
  .geovee-winback-control-actions .button,
  .geovee-map-address-row .button,
  .geovee-job-preview-btn,
  .geovee-customer-focus-btn {
    width: 100%;
  }

  .geovee-map-controls-grid {
    grid-template-columns: 1fr;
  }

  .geovee-map-address-row,
  .geovee-winback-control-grid,
  .geovee-map-preview-stats {
    grid-template-columns: 1fr;
  }

  .geovee-map-canvas {
    height: 420px;
  }

  .geovee-map-sidebar-header h3,
  .geovee-map-queue-header h3 {
    font-size: 22px;
  }

  .geovee-map-queue-drawer {
    width: 100vw;
    top: auto;
    bottom: 0;
    height: min(88vh, 760px);
    transform: translateY(100%);
    border-left: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  body.geovee-map-drawer-open .geovee-map-queue-drawer {
    transform: translateY(0);
  }

  .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-card,
  .geovee-map-stage-card.is-map-fullscreen-active {
    top: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-canvas,
  .geovee-map-stage-card.is-map-fullscreen-active .geovee-map-canvas {
    min-height: 0;
  }
}


/* Fullscreen + admin-bar safety fixes */
.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-card,
.geovee-map-stage-card.is-map-fullscreen-active,
.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-header,
.geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-fullscreen-btn,
.geovee-neighborhood-map-wrap.is-map-fullscreen .leaflet-container {
  z-index: 10002;
}

body.geovee-map-fullscreen-open::before {
  pointer-events: none;
}

body.admin-bar .geovee-map-queue-drawer {
  top: 32px;
  height: calc(100vh - 32px);
}

body.admin-bar .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-card,
body.admin-bar .geovee-map-stage-card.is-map-fullscreen-active {
  top: 44px !important;
  right: 12px !important;
  bottom: 12px !important;
  left: 12px !important;
}

body.admin-bar .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-canvas,
body.admin-bar .geovee-map-stage-card.is-map-fullscreen-active .geovee-map-canvas {
  min-height: 0;
}

@media (max-width: 782px) {
  body.admin-bar .geovee-map-queue-drawer {
    top: auto;
    height: min(82vh, 720px);
  }

  body.admin-bar .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-stage-card,
  body.admin-bar .geovee-map-stage-card.is-map-fullscreen-active {
    top: 54px !important;
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;
  }

  body.admin-bar .geovee-neighborhood-map-wrap.is-map-fullscreen .geovee-map-canvas,
  body.admin-bar .geovee-map-stage-card.is-map-fullscreen-active .geovee-map-canvas {
    min-height: 0;
  }
}


/* Keep queue drawer usable in and out of fullscreen */
body.geovee-map-fullscreen-open .geovee-map-overlay {
  z-index: 10003;
}

body.geovee-map-fullscreen-open .geovee-map-queue-drawer {
  z-index: 10004;
}

body.geovee-map-fullscreen-open.geovee-map-drawer-open .geovee-map-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.geovee-map-fullscreen-open .geovee-map-queue-drawer,
body.admin-bar.geovee-map-fullscreen-open .geovee-map-queue-drawer {
  top: 12px;
  height: calc(100vh - 24px);
  border-radius: 22px 0 0 22px;
}

@media (max-width: 782px) {
  body.geovee-map-fullscreen-open .geovee-map-queue-drawer,
  body.admin-bar.geovee-map-fullscreen-open .geovee-map-queue-drawer {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: min(88vh, 760px);
    border-radius: 20px 20px 0 0;
  }
}

body.admin-bar.geovee-map-fullscreen-open .geovee-map-queue-drawer {
  top: 44px;
  height: calc(100vh - 56px);
}

@media (max-width: 782px) {
  body.admin-bar.geovee-map-fullscreen-open .geovee-map-queue-drawer {
    top: auto;
    height: min(82vh, 720px);
  }
}
