/* Panorama Municipal — Apple Liquid Glass shell */

body.pm-apple-shell {
  --pm-apple-blur: blur(26px) saturate(1.32) brightness(1.06);
  --pm-apple-blur-strong: blur(32px) saturate(1.38) brightness(1.08);
  --pm-apple-glass-border: rgba(255, 255, 255, 0.34);
  --pm-apple-text: rgba(255, 255, 255, 0.96);
  --pm-apple-text-muted: rgba(255, 255, 255, 0.68);
  --pm-apple-radius-pill: 999px;
  --pm-apple-radius-card: 22px;
  --pm-apple-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
}

/* ── Topbar principal ───────────────────────────────────── */
body.pm-apple-shell .pm-apple-topbar {
  position: relative;
  z-index: 30;
  flex: 0 0 auto !important;
  width: 100% !important;
  padding: 10px 14px 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.pm-apple-shell .pm-apple-topbar__shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.pm-apple-shell .pm-apple-topbar__primary {
  display: grid;
  grid-template-columns: auto minmax(280px, 520px) 1fr;
  align-items: center;
  gap: 14px;
  min-height: 76px;
}

body.pm-apple-shell .pm-apple-brand-card:not(#pmBrandCard) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--pm-apple-glass-border);
  border-radius: var(--pm-apple-radius-pill);
  background: transparent;
  backdrop-filter: var(--pm-apple-blur);
  -webkit-backdrop-filter: var(--pm-apple-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 24px rgba(8, 22, 48, 0.08);
  color: var(--pm-apple-text);
  cursor: pointer;
  transition: transform 0.18s var(--pm-apple-ease), box-shadow 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  min-width: 250px;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
  -webkit-backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: var(--pm-apple-text);
  cursor: default;
  overflow: hidden;
  isolation: isolate;
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card .pm-apple-brand-card__logo {
  width: 38px;
  height: 38px;
}

body.pm-apple-shell .pm-apple-brand-card:not(.pm-apple-brand-card--static):hover {
  transform: translateY(-1px) scale(1.01);
}

body.pm-apple-shell .pm-apple-brand-card--static {
  cursor: default;
  pointer-events: none;
  user-select: none;
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome {
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  text-align: left;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.82);
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

body.pm-apple-shell .pm-apple-brand-card--static:hover {
  transform: none;
}

body.pm-apple-shell .pm-apple-brand-card__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  text-align: left;
}

body.pm-apple-shell .pm-apple-brand-card__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--pm-apple-text);
  white-space: nowrap;
}

body.pm-apple-shell .pm-apple-brand-card__title-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease;
}

body.pm-apple-shell .pm-apple-brand-card__title-btn:hover {
  color: #2563eb;
}

body.pm-apple-shell .pm-apple-brand-card__title-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: 2px;
}

body.pm-apple-shell .pm-apple-brand-card__sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--pm-apple-text-muted);
  line-height: 1.2;
}

body.pm-apple-shell .pm-apple-brand-card__chev {
  opacity: 0.72;
  flex-shrink: 0;
}

body.pm-apple-shell .pm-apple-profile-btn__chev {
  margin-left: auto;
  opacity: 0.72;
  flex-shrink: 0;
}

body.pm-apple-shell .pm-apple-search {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 520px !important;
  height: 46px !important;
  padding: 0 14px 0 16px !important;
  margin: 0 auto !important;
  border-radius: var(--pm-apple-radius-pill) !important;
  border: 1px solid var(--pm-apple-glass-border) !important;
  background: transparent !important;
  backdrop-filter: var(--pm-apple-blur) !important;
  -webkit-backdrop-filter: var(--pm-apple-blur) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 20px rgba(8, 22, 48, 0.06) !important;
  transition: box-shadow 0.18s var(--pm-apple-ease), transform 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell .pm-apple-search:focus-within {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 3px rgba(37, 99, 235, 0.16),
    0 10px 28px rgba(8, 22, 48, 0.1) !important;
}

body.pm-apple-shell .pm-apple-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--pm-apple-text);
  font-size: 14px;
  font-weight: 400;
}

body.pm-apple-shell .pm-apple-search input::placeholder {
  color: var(--pm-apple-text-muted);
}

body.pm-apple-shell .pm-apple-search__kbd {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--pm-apple-text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

body.pm-apple-shell .pm-apple-topbar__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

body.pm-apple-shell .pm-apple-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--pm-apple-radius-pill);
  border: 1px solid var(--pm-apple-glass-border);
  background: transparent;
  backdrop-filter: var(--pm-apple-blur);
  -webkit-backdrop-filter: var(--pm-apple-blur);
  color: var(--pm-apple-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.18s var(--pm-apple-ease), box-shadow 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell .pm-apple-pill-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

body.pm-apple-shell .pm-apple-circle-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--pm-apple-glass-border);
  background: transparent;
  backdrop-filter: var(--pm-apple-blur);
  -webkit-backdrop-filter: var(--pm-apple-blur);
  color: var(--pm-apple-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell .pm-apple-circle-btn:hover {
  transform: translateY(-1px) scale(1.04);
}

body.pm-apple-shell .pm-apple-circle-btn .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

body.pm-apple-shell .pm-apple-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--pm-apple-radius-pill);
  border: 1px solid var(--pm-apple-glass-border);
  background: transparent;
  backdrop-filter: var(--pm-apple-blur-strong);
  -webkit-backdrop-filter: var(--pm-apple-blur-strong);
  color: var(--pm-apple-text);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell .pm-apple-profile-btn:hover {
  transform: translateY(-1px) scale(1.01);
}

body.pm-apple-shell .pm-apple-topbar__user-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

body.pm-apple-shell .pm-apple-topbar__rail-end {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

body.pm-apple-shell .pm-apple-ia-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 6px 16px 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(32px) saturate(1.55) brightness(1.05);
  -webkit-backdrop-filter: blur(32px) saturate(1.55) brightness(1.05);
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 28px rgba(15, 35, 71, 0.08);
  transition: transform 0.18s var(--pm-apple-ease), background 0.18s ease;
  position: relative;
  overflow: hidden;
}

body.pm-apple-shell .pm-apple-ia-btn:hover {
  transform: translateY(-1px) scale(1.01);
  background: rgba(255, 255, 255, 0.46);
}

body.pm-apple-shell .pm-apple-ia-btn__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: none;
}

body.pm-apple-shell .pm-apple-ia-btn__avatar {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
  pointer-events: none;
}

body.pm-apple-shell .pm-apple-ia-btn__label {
  white-space: nowrap;
  color: #000000;
  font-weight: 600;
}

body.pm-apple-shell .pm-apple-profile-btn__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

body.pm-apple-shell .pm-apple-profile-btn__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--pm-apple-text) !important;
}

body.pm-apple-shell .pm-apple-profile-btn__role {
  font-size: 11px;
  font-weight: 400;
  color: var(--pm-apple-text-muted) !important;
}

body.pm-apple-shell .pm-apple-profile-btn__avatar {
  width: 36px !important;
  height: 36px !important;
}

/* Subnav */
body.pm-apple-shell .pm-apple-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 2px 10px;
}

body.pm-apple-shell .pm-apple-subnav__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--pm-apple-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  color: var(--pm-apple-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--pm-apple-ease);
}

body.pm-apple-shell .pm-apple-subnav__pill:hover {
  color: var(--pm-apple-text);
  border-color: var(--pm-apple-glass-border);
  transform: translateY(-1px);
}

body.pm-apple-shell .pm-apple-subnav__pill.is-active {
  color: #fff;
  border-color: rgba(37, 99, 235, 0.5);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.88), rgba(37, 99, 235, 0.92));
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24);
}

body.pm-apple-shell .pm-apple-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 200px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--pm-apple-glass-border);
  background: rgba(15, 35, 71, 0.42);
  backdrop-filter: var(--pm-apple-blur-strong);
  -webkit-backdrop-filter: var(--pm-apple-blur-strong);
  box-shadow: 0 16px 40px rgba(8, 22, 48, 0.18);
}

body.pm-apple-shell .pm-apple-popover button,
body.pm-apple-shell .pm-apple-popover a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--pm-apple-text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

body.pm-apple-shell .pm-apple-popover button:hover,
body.pm-apple-shell .pm-apple-popover a:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.pm-apple-shell .pm-apple-topbar__actions {
  position: relative;
}

/* Mapa — estilo Apple Maps (dessaturado) */
body.pm-apple-shell.map-source-active .pm-map-iframe,
body.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-iframe {
  filter: saturate(0.68) brightness(1.08) contrast(0.94) hue-rotate(-4deg);
}

/* Clima */
body.pm-apple-shell .pm-weather-card {
  top: 16px !important;
  left: 16px !important;
  border-radius: var(--pm-apple-radius-pill) !important;
  padding: 10px 14px !important;
  background: transparent !important;
  border: 1px solid var(--pm-apple-glass-border) !important;
  backdrop-filter: var(--pm-apple-blur) !important;
  -webkit-backdrop-filter: var(--pm-apple-blur) !important;
  color: var(--pm-apple-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 24px rgba(8, 22, 48, 0.08) !important;
}

body.pm-apple-shell .pm-weather-card-temp,
body.pm-apple-shell .pm-weather-card-status {
  color: var(--pm-apple-text) !important;
}

/* Rail esquerda removido — controles ficam na topbar/subnav */
body.pm-apple-shell .pm-map-area .pm-map-corner-right {
  top: auto !important;
  bottom: 18px !important;
  right: 14px !important;
  flex-direction: column !important;
  gap: 10px !important;
}

body.pm-apple-shell .pm-map-round-btn,
body.pm-apple-shell .pm-map-zoom-pill,
body.pm-apple-shell .pm-map-zoom-btn {
  background: transparent !important;
  border: 1px solid var(--pm-apple-glass-border) !important;
  backdrop-filter: var(--pm-apple-blur) !important;
  -webkit-backdrop-filter: var(--pm-apple-blur) !important;
  color: var(--pm-apple-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(8, 22, 48, 0.08) !important;
}

/* Camadas ativas — centro inferior */
body.pm-apple-shell .pm-map-bottom-hud {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 200px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
  z-index: 3;
}

body.pm-apple-shell .pm-map-scale-hud {
  display: none !important;
}

body.pm-apple-shell .pm-active-bar {
  pointer-events: auto;
  width: 100%;
  border-radius: var(--pm-apple-radius-pill) !important;
  padding: 12px 16px !important;
  background: transparent !important;
  border: 1px solid var(--pm-apple-glass-border) !important;
  backdrop-filter: var(--pm-apple-blur-strong) !important;
  -webkit-backdrop-filter: var(--pm-apple-blur-strong) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 32px rgba(8, 22, 48, 0.12) !important;
  color: var(--pm-apple-text) !important;
}

body.pm-apple-shell .pm-active-bar-label,
body.pm-apple-shell .pm-active-bar-count,
body.pm-apple-shell .pm-active-empty {
  color: var(--pm-apple-text-muted) !important;
}

body.pm-apple-shell .pm-map-bottom-hud .pm-active-bar {
  min-height: 52px !important;
  max-height: none !important;
  height: auto !important;
  flex-wrap: wrap !important;
}

body.pm-apple-shell .pm-map-bottom-hud .pm-active-bar-action {
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--pm-apple-text) !important;
}

/* Ocultar estilos legados da topbar flutuante */
body.pm-apple-shell .pm-float-topbar__help-btn:not(#btnTutu) {
  display: none !important;
}

body.pm-apple-shell .topbar.pm-glass-topbar {
  backdrop-filter: none !important;
  background: transparent !important;
}

body.pm-apple-shell.map-source-active .pm-apple-brand-card__title,
body.pm-apple-shell.map-source-active .pm-apple-search input,
body.pm-apple-shell.map-source-active .pm-apple-pill-btn,
body.pm-apple-shell.map-source-active .pm-apple-circle-btn,
body.pm-apple-shell.map-source-active .pm-apple-profile-btn__name {
  color: var(--pm-apple-text) !important;
}

@media (max-width: 1100px) {
  body.pm-apple-shell .pm-apple-topbar__primary {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  body.pm-apple-shell .pm-apple-pill-btn__label {
    display: none;
  }

  body.pm-apple-shell .pm-apple-profile-btn {
    max-width: min(168px, 22vw);
    padding-right: 10px !important;
  }

  body.pm-apple-shell .pm-apple-profile-btn__copy {
    display: flex !important;
    max-width: 100%;
  }

  body.pm-apple-shell .pm-apple-profile-btn__role {
    display: none;
  }

  body.pm-apple-shell .pm-apple-search {
    max-width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pm-apple-shell .pm-apple-brand-card,
  body.pm-apple-shell .pm-apple-pill-btn,
  body.pm-apple-shell .pm-apple-circle-btn,
  body.pm-apple-shell .pm-apple-subnav__pill {
    transition: none !important;
  }
}

/* Final Apple Maps / visionOS composition */
body.pm-apple-shell {
  --pm-apple-surface: rgba(255, 255, 255, 0.16);
  --pm-apple-surface-hover: rgba(255, 255, 255, 0.23);
  --pm-apple-surface-strong: rgba(255, 255, 255, 0.21);
  --pm-apple-stroke: rgba(255, 255, 255, 0.28);
  --pm-apple-shadow: 0 18px 48px rgba(7, 24, 54, 0.14);
  --pm-apple-blue: #73a7ff;
  background:
    linear-gradient(135deg, rgba(8, 50, 105, 0.88), rgba(15, 78, 130, 0.54) 47%, rgba(231, 125, 72, 0.56)),
    var(--pm-bridge-bg-color, #0b3c76) !important;
  color: var(--pm-apple-text);
}

body.pm-apple-shell .main {
  min-width: 0;
}

body.pm-apple-shell .pm-apple-topbar {
  padding: 14px 18px 0 !important;
}

body.pm-apple-shell .pm-apple-topbar__shell {
  gap: 10px;
  width: 100%;
  max-width: none;
}

body.pm-apple-shell .pm-apple-topbar__primary {
  width: 100%;
  grid-template-columns: minmax(250px, 300px) minmax(360px, 560px) minmax(0, 1fr);
  min-height: 64px;
  gap: 22px;
}

body.pm-apple-shell .pm-apple-brand-card:not(#pmBrandCard),
body.pm-apple-shell .pm-apple-search,
body.pm-apple-shell .pm-apple-pill-btn,
body.pm-apple-shell .pm-apple-circle-btn,
body.pm-apple-shell .pm-apple-ia-btn,
body.pm-apple-shell .pm-apple-subnav__pill {
  position: relative;
  overflow: hidden;
  background: var(--pm-apple-surface) !important;
  border-color: var(--pm-apple-stroke) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(5, 24, 54, 0.1) !important;
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--static,
body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome {
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.34) !important;
  border-color: rgba(255, 255, 255, 0.68) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
  -webkit-backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
}

body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--static::before,
body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--static::after,
body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome::before,
body.pm-apple-shell #pmBrandCard.pm-apple-brand-card--welcome::after {
  display: none !important;
  content: none !important;
}

body.pm-apple-shell #btnUser.pm-apple-profile-btn,
body.pm-apple-shell .pm-apple-profile-btn.user-btn {
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.34) !important;
  border-color: rgba(255, 255, 255, 0.68) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 36px rgba(15, 35, 71, 0.12) !important;
  backdrop-filter: blur(32px) saturate(1.55) brightness(1.05);
  -webkit-backdrop-filter: blur(32px) saturate(1.55) brightness(1.05);
}

body.pm-apple-shell #btnUser.pm-apple-profile-btn::before,
body.pm-apple-shell .pm-apple-profile-btn.user-btn::before {
  display: none !important;
  content: none !important;
}

body.pm-apple-shell #pmWeatherCard.pm-weather-card--topbar,
body.pm-apple-shell .pm-weather-card.pm-weather-card--topbar {
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.34) !important;
  border-color: rgba(255, 255, 255, 0.68) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 36px rgba(15, 35, 71, 0.12) !important;
  backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
  -webkit-backdrop-filter: blur(52px) saturate(1.6) brightness(1.06);
}

body.pm-apple-shell :is(
  .pm-apple-brand-card:not(#pmBrandCard),
  .pm-apple-search,
  .pm-apple-pill-btn,
  .pm-apple-circle-btn,
  .pm-apple-ia-btn,
  .pm-apple-subnav__pill
)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.2), transparent 42%);
  pointer-events: none;
}

body.pm-apple-shell .pm-apple-brand-card:not(#pmBrandCard) {
  min-width: 250px;
  height: 58px;
  padding: 7px 14px 7px 7px;
  border-radius: 19px;
}

body.pm-apple-shell .pm-apple-brand-card__logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}

body.pm-apple-shell .pm-apple-brand-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.pm-apple-shell .pm-apple-search {
  max-width: 560px !important;
  height: 52px !important;
}

body.pm-apple-shell .pm-apple-topbar__actions {
  grid-column: 3;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  justify-self: end !important;
  gap: 10px;
}

body.pm-apple-shell .pm-apple-pill-btn,
body.pm-apple-shell .pm-apple-circle-btn {
  height: 48px;
}

body.pm-apple-shell .pm-apple-circle-btn {
  width: 48px;
}

body.pm-apple-shell .pm-apple-profile-btn {
  min-width: 196px;
  height: 52px;
}

body.pm-apple-shell .pm-apple-subnav {
  gap: 9px;
  padding: 0 2px 12px;
}

body.pm-apple-shell .pm-apple-subnav__pill {
  height: 40px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.9);
}

body.pm-apple-shell .pm-apple-subnav__pill.is-active {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.46) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 0 5px rgba(255, 255, 255, 0.07),
    0 10px 24px rgba(7, 28, 61, 0.12) !important;
}

body.pm-apple-shell.map-source-active .main {
  padding: 0 !important;
}

body.pm-apple-shell.map-source-active .pm-glass-map-layout.pm-map-layout {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

body.pm-apple-shell .pm-glass-map-card,
body.pm-apple-shell .pm-vision-sidebar.pm-map-sidebar {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.pm-apple-shell.map-source-active .pm-glass-map-area.pm-map-area {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

body.pm-apple-shell.map-source-active .pm-map-iframe,
body.pm-apple-shell .censo-integrated[data-active-source="mapa"] .pm-map-iframe {
  filter: none !important;
  -webkit-filter: none !important;
}

body.pm-apple-shell .pm-weather-card:not(.pm-weather-card--topbar) {
  top: 18px !important;
  left: 18px !important;
  min-width: 210px;
  min-height: 66px;
  border-radius: 18px !important;
  background: rgba(240, 249, 255, 0.72) !important;
  color: #25466f !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
}

body.pm-apple-shell .pm-weather-card :is(
  .pm-weather-card-temp,
  .pm-weather-card-status,
  .pm-weather-card-chevron
) {
  color: #25466f !important;
}

body.pm-apple-shell .pm-apple-map-rail {
  display: none !important;
}

body.pm-apple-shell .pm-map-area .pm-map-corner-right {
  bottom: 22px !important;
  right: 18px !important;
  top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
}

body.pm-apple-shell .pm-map-round-btn,
body.pm-apple-shell .pm-map-zoom-pill,
body.pm-apple-shell #pmMapSidebarEdgeToggle,
body.pm-apple-shell #pmMapFullscreenBtn {
  background: rgba(255, 255, 255, 0.34) !important;
  background-color: rgba(255, 255, 255, 0.34) !important;
  background-image: none !important;
  backdrop-filter: blur(32px) saturate(1.55) brightness(1.05) !important;
  -webkit-backdrop-filter: blur(32px) saturate(1.55) brightness(1.05) !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
  color: #1a2b3c !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 28px rgba(15, 35, 71, 0.08) !important;
}

body.pm-apple-shell .pm-map-zoom-pill {
  border-radius: 16px !important;
  overflow: hidden;
}

body.pm-apple-shell .pm-map-sidebar-edge-toggle {
  position: static !important;
  inset: auto !important;
  order: 0;
  flex: 0 0 auto;
  margin: 0 0 2px !important;
}

body.pm-apple-shell .pm-map-tools-popover {
  position: absolute !important;
  left: auto !important;
  right: calc(100% + 12px) !important;
  top: auto !important;
  bottom: 0 !important;
}

body.pm-apple-shell .pm-map-tools-wrap {
  position: relative !important;
  order: 1;
}

body.pm-apple-shell .pm-map-zoom-pill {
  order: 2;
}

body.pm-apple-shell #pmMapFullscreenBtn {
  order: 3;
}

body.pm-apple-shell .pm-map-bottom-hud {
  bottom: 18px !important;
  width: min(570px, calc(100% - 250px)) !important;
}

body.pm-apple-shell .pm-active-bar {
  min-height: 54px !important;
  border-radius: 999px !important;
  background: rgba(248, 252, 255, 0.78) !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  color: #234b79 !important;
  box-shadow: 0 16px 36px rgba(17, 48, 82, 0.15) !important;
}

body.pm-apple-shell .pm-active-bar-label {
  color: #245da8 !important;
  font-weight: 600 !important;
}

body.pm-apple-shell .pm-active-bar-count,
body.pm-apple-shell .pm-active-empty,
body.pm-apple-shell .pm-active-chip-text {
  color: #5f7691 !important;
}

body.pm-apple-shell .pm-vision-sidebar.pm-map-sidebar {
  border-radius: 24px !important;
  background:
    linear-gradient(180deg, rgba(55, 105, 165, 0.25), rgba(255, 255, 255, 0.12) 46%, rgba(224, 123, 71, 0.18)) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 48px rgba(7, 24, 54, 0.14) !important;
  backdrop-filter: blur(28px) saturate(1.26) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.26) !important;
}

body.pm-apple-shell .pm-vision-sidebar.pm-map-sidebar::after {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(36, 84, 143, 0.13), rgba(255, 255, 255, 0.05) 54%, rgba(235, 137, 85, 0.12)) !important;
}

body.pm-apple-shell .pm-vision-sidebar > .pm-sb-tabs.pm-sb-tabs--icon-only {
  padding: 14px 14px 10px !important;
}

body.pm-apple-shell .pm-vision-sidebar .pm-sb-tab {
  min-height: 58px !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

body.pm-apple-shell .pm-vision-sidebar .pm-sb-tab.active {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.52) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 24px rgba(8, 32, 66, 0.1) !important;
}

body.pm-apple-shell .pm-vision-sidebar #pmtab-categorias.pm-sb-panel.active {
  padding: 4px 14px 18px !important;
  gap: 16px !important;
}

body.pm-apple-shell .pm-vision-sidebar #pmtab-categorias .map-cat-item {
  min-height: 56px !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.pm-apple-shell .pm-vision-sidebar #pmtab-categorias .map-cat-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.21) !important;
  box-shadow: 0 12px 26px rgba(8, 30, 62, 0.12) !important;
}

body.pm-apple-shell .pm-vision-sidebar .pm-layers-card {
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body.pm-apple-shell .pm-vision-sidebar .pm-layer-row,
body.pm-apple-shell .pm-vision-sidebar .map-layer-row,
body.pm-apple-shell .pm-vision-sidebar .map-layer-special,
body.pm-apple-shell .pm-vision-sidebar .map-layer-item,
body.pm-apple-shell .pm-vision-sidebar .pm-layer-item {
  min-height: 72px !important;
  padding: 13px 14px !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease !important;
}

body.pm-apple-shell .pm-vision-sidebar :is(.pm-layer-row, .map-layer-row, .map-layer-special, .map-layer-item, .pm-layer-item):hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.21) !important;
  box-shadow: 0 13px 28px rgba(8, 30, 62, 0.11) !important;
}

body.pm-apple-shell .pm-vision-sidebar :is(
  .pm-layer-open-btn,
  .pm-layer-arrow,
  .pm-map-layer-action,
  .map-layer-arrow,
  .mls-go,
  .map-toggle-track
) {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

body.pm-apple-shell .pm-vision-sidebar,
body.pm-apple-shell .pm-vision-sidebar :is(
  .pm-sb-section-label,
  .pm-layers-card-head,
  .pm-layer-count,
  .map-layer-section,
  .mlr-title,
  .mlr-sub,
  .mlr-state,
  .mls-title,
  .mls-sub,
  .pm-cat-label,
  .pm-special-back,
  .pm-macro-hero,
  .pm-macro-hero h3,
  .pm-macro-hero p,
  .pm-macro-kpi span,
  .pm-macro-kpi strong,
  .pm-macro-kpi small,
  .pm-macro-section-title strong,
  .pm-macro-section-title span,
  .pm-macro-legend-item strong,
  .pm-macro-legend-item span,
  .pm-dom-hero-title,
  .pm-dom-hero-sub,
  .pm-report-home-title,
  .pm-report-home-sub,
  .pm-action-field-label
) {
  color: #ffffff !important;
  text-shadow: 0 1px 10px rgba(8, 24, 52, 0.18);
}

body.pm-apple-shell .pm-vision-sidebar :is(
  svg,
  svg *,
  .pm-cat-arrow,
  .mls-go,
  .map-toggle-glyph
) {
  color: #ffffff !important;
  stroke: currentColor !important;
}

body.pm-apple-shell .pm-vision-sidebar :is(input, textarea, select) {
  color: #ffffff !important;
}

body.pm-apple-shell .pm-vision-sidebar :is(input, textarea)::placeholder {
  color: rgba(255, 255, 255, 0.72) !important;
}

@media (max-width: 1380px) {
  body.pm-apple-shell .pm-apple-topbar__primary {
    grid-template-columns: minmax(220px, 260px) minmax(300px, 1fr) auto;
    gap: 12px;
  }

  body.pm-apple-shell .pm-apple-profile-btn {
    min-width: 0;
    max-width: min(196px, 24vw);
  }

  body.pm-apple-shell .pm-apple-profile-btn__copy {
    display: flex !important;
    min-width: 0;
    max-width: 100%;
  }

  body.pm-apple-shell .pm-apple-profile-btn__role {
    display: none;
  }

  body.pm-apple-shell .pm-apple-profile-btn__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}

@media (max-width: 980px) {
  body.pm-apple-shell .pm-apple-topbar {
    padding: 10px 10px 0 !important;
  }

  body.pm-apple-shell .pm-apple-topbar__primary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  body.pm-apple-shell .pm-apple-brand-card {
    min-width: 0;
    width: 54px;
    padding: 5px;
  }

  body.pm-apple-shell .pm-apple-brand-card__copy,
  body.pm-apple-shell .pm-apple-brand-card__chev,
  body.pm-apple-shell .pm-apple-pill-btn,
  body.pm-apple-shell #btnApps {
    display: none !important;
  }

  body.pm-apple-shell .pm-apple-subnav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  body.pm-apple-shell .pm-glass-map-layout.pm-map-layout {
    display: flex !important;
  }

}

/* Specificity guards against the legacy map shell. */
html body.pm-liquid-v2.pm-apple-shell .pm-glass-map-layout.pm-map-layout {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-glass-map-layout.pm-map-layout.pm-map-sidebar-rail-collapsed {
  grid-template-columns: none !important;
  gap: 0 !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-glass-rail.pm-map-sidebar {
  width: var(--pm-map-rail-width, 380px) !important;
  min-width: 0 !important;
  max-width: min(420px, calc(100vw - 24px)) !important;
  flex: none !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-bottom-hud.pm-map-corner-bottom {
  left: 12px !important;
  right: calc(var(--pm-map-rail-width, 380px) + var(--pm-map-hud-right-reserve, 86px)) !important;
  bottom: 18px !important;
  width: auto !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 0 !important;
  transform: none !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-layout.pm-map-sidebar-rail-collapsed .pm-map-bottom-hud.pm-map-corner-bottom {
  right: var(--pm-map-hud-right-reserve-collapsed, 74px) !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-bottom-hud .pm-map-scale-hud,
html body.pm-liquid-v2.pm-apple-shell .pm-map-bottom-hud #pmMapDistanceCard {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
  flex: none !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-bottom-hud .pm-active-bar {
  grid-column: auto !important;
  flex: 0 0 auto !important;
  width: min(var(--pm-active-bar-max, 480px), 100%) !important;
  max-width: min(var(--pm-active-bar-max, 480px), 100%) !important;
  min-width: 0 !important;
  border-radius: 999px !important;
}

@media (max-width: 980px) {
  html body.pm-liquid-v2.pm-apple-shell .pm-glass-map-layout.pm-map-layout {
    display: flex !important;
  }

  html body.pm-liquid-v2.pm-apple-shell .pm-map-bottom-hud.pm-map-corner-bottom {
    left: 12px !important;
    right: var(--pm-map-hud-right-reserve-collapsed, 74px) !important;
    bottom: calc(min(62vh, 520px) + 20px) !important;
    width: auto !important;
  }
}

html body.pm-liquid-v2.pm-apple-shell .pm-apple-topbar__shell,
html body.pm-liquid-v2.pm-apple-shell .pm-apple-topbar__primary {
  width: 100% !important;
  max-width: none !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-apple-topbar__actions {
  grid-column: 3 !important;
  justify-self: end !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-area .pm-map-corner-right {
  top: auto !important;
  right: 18px !important;
  bottom: var(--pm-map-rail-bottom, 52px) !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-map-area .pm-map-sidebar-edge-toggle {
  position: static !important;
  inset: auto !important;
  margin: 0 0 2px !important;
}

html body.pm-liquid-v2.pm-apple-shell.map-source-active #pmMapToolsPopover.pm-map-tools-popover:not(.pm-map-tools-popover--topbar),
html body.pm-liquid-v2.pm-apple-shell .censo-integrated[data-active-source="mapa"] #pmMapToolsPopover.pm-map-tools-popover:not(.pm-map-tools-popover--topbar) {
  position: absolute !important;
  left: auto !important;
  right: calc(100% + 12px) !important;
  top: auto !important;
  bottom: 0 !important;
  transform: none !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-vision-sidebar :is(
  .pm-sb-section-label,
  .pm-layers-card-head,
  .pm-layer-count,
  .map-layer-section,
  .mlr-title,
  .mlr-sub,
  .mlr-state,
  .mls-title,
  .mls-sub,
  .pm-cat-label,
  .pm-special-back,
  .pm-macro-panel *,
  .pm-domicilios-panel *,
  .pm-report-builder-wrap *,
  .pm-action-panel *
) {
  color: #ffffff !important;
}

html body.pm-liquid-v2.pm-apple-shell .pm-vision-sidebar :is(
  h1, h2, h3, h4, h5, h6, p, span, strong, small, label, button
):not(.pm-sec-nav-item):not(.pm-sec-nav-title):not(.pm-sec-nav-sub):not(.pm-sec-nav-text):not(.pm-sec-nav-icon):not(.pm-sec-nav-chevron) {
  color: #ffffff !important;
}
