/* RadarBR — Minimal Docked Left Sidebar + Full-Bleed Map */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --crimson: #991b1b;
  --crimson-dark: #7f1d1d;
  --amber: #b45309;
  --sage: #166534;

  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;

  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.14);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottom-nav-h: calc(58px + var(--safe-bottom));
  --topbar-h: 54px;
  --sidebar-w: 368px;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.42;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.ico {
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-block;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.btn-primary:hover { background: #1e293b; }

.link-btn {
  border: 0;
  background: none;
  color: var(--crimson);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 4px;
}
.link-btn:hover { text-decoration: underline; }

/* ============ HEADER ============ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: calc(10px + var(--safe-top)) 12px 8px;
  pointer-events: none;
}

body[data-tab="relatorios"] .app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  pointer-events: auto;
}

.brand { display: none; }
.header-desktop-actions { display: none; }

.city-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Searchable City Combobox */
.city-combo {
  position: relative;
  flex: 1;
  min-width: 0;
}

.city-combo__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: border-color 0.13s, background 0.13s;
}
/* Só mostra a cidade atual: a troca é pela busca unificada */
.city-combo__trigger--static { cursor: default; }

body[data-tab="relatorios"] .city-combo__trigger {
  height: 36px;
  background: var(--bg);
  box-shadow: none;
  border-color: var(--border);
}

.city-combo__pin { color: var(--crimson); }
.city-combo__value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-pill-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
}
body[data-tab="relatorios"] .icon-pill-btn {
  width: 36px;
  height: 36px;
  background: var(--surface);
  box-shadow: none;
  border-color: var(--border);
}
.icon-pill-btn.is-spinning svg { animation: radarSpin 0.7s linear infinite; }
@keyframes radarSpin { to { transform: rotate(360deg); } }

/* ============ WORKSPACE ============ */
.workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

/* ============ UNIFIED LEFT PANEL (MOBILE FULL TAB / DESKTOP DOCKED SIDEBAR) ============ */
.left-panel {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

body[data-tab="relatorios"] .left-panel {
  opacity: 1;
  pointer-events: auto;
  padding-top: calc(54px + var(--safe-top));
}

.left-panel__top {
  flex: none;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
}

.left-panel__search-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Busca unificada: cidades, bairros e ocorrências num só campo */
.unified-search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1200;
  max-height: min(70vh, 440px);
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.search-suggest__group {
  padding: 8px 9px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.search-suggest__opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 12.5px;
  color: var(--ink);
  cursor: pointer;
}
.search-suggest__opt:hover,
.search-suggest__opt.is-highlighted { background: var(--surface-soft); }
.search-suggest__ico { flex: none; width: 15px; height: 15px; color: var(--ink-subtle); }
.search-suggest__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.search-suggest__name mark { background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.search-suggest__meta { flex: none; font-size: 11px; color: var(--ink-subtle); }
.search-suggest__empty { padding: 10px 9px; font-size: 12px; color: var(--ink-subtle); }

.sidebar-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.sidebar-search:focus-within { background: var(--surface); border-color: var(--ink); }
.sidebar-search svg { width: 14px; height: 14px; color: var(--ink-subtle); flex: none; }
.sidebar-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 12.5px;
}
/* O campo tem o próprio botão de limpar: esconde o "x" nativo do type=search */
.sidebar-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.sidebar-search__clear {
  border: 0;
  background: var(--border);
  color: var(--ink);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.left-panel__collapse {
  display: none;
  width: 32px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  place-items: center;
  flex: none;
}
.left-panel__collapse:hover { background: var(--surface-soft); color: var(--ink); }

/* Horizontal Time Bar (LiveCrimeMap style) */
.time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}
.time-seg {
  flex: 1;
  height: 27px;
  padding: 0 4px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.12s, color 0.12s;
}
.time-seg:hover { background: var(--surface-soft); color: var(--ink); }
.time-seg.is-active {
  background: var(--ink);
  color: #fff;
}

.date-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.date-range-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
}
.date-range-row input[type="date"] {
  width: 100%;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 11.5px;
}

/* 2-Tab Switcher: Ocorrências | Bairros */
.left-panel__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: var(--surface-soft);
}
.left-panel__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
}
.left-panel__tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.left-panel__tab-cnt {
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.08);
  font-size: 10px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.left-panel__active-bar {
  flex: none;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.bairro-active-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.bairro-active-box__pin {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex: none;
  display: grid;
  place-items: center;
}
.bairro-active-box__pin svg { width: 17px; height: 17px; }
.bairro-active-box__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.bairro-active-box__txt strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bairro-active-box__txt span {
  font-size: 10.5px;
  color: var(--ink-subtle);
}
.bairro-active-box__btn {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}
.bairro-active-box__btn:hover { background: var(--surface-soft); }

.left-panel__view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.left-panel__view--scroll {
  overflow-y: auto;
  padding: 10px 12px 24px;
  gap: 10px;
  scrollbar-width: thin;
}

/* ============ COMPACT 2-COLUMN CATEGORY GRID ============ */
.cat-panel {
  flex: none;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Exclusive layer switcher (Crimes | Trânsito | Eventos | Serviços | Clima | Empregos — grid 3x2) */
.domain-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.domain-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  padding: 6px 2px 5px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.domain-pill:hover {
  color: var(--ink);
  border-color: var(--border-strong);
  background: var(--surface);
}
.domain-pill:focus-visible { outline: 2px solid var(--dom-color, var(--ink)); outline-offset: 1px; }
.domain-pill__ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--dom-color, var(--ink-muted));
  background: color-mix(in srgb, var(--dom-color, #64748b) 11%, transparent);
  transition: background 0.12s, color 0.12s;
}
.domain-pill__ico svg { width: 15px; height: 15px; }
.domain-pill__label {
  max-width: 100%;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.domain-pill__cnt {
  position: absolute;
  top: -6px;
  right: -3px;
  z-index: 1;
  min-width: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  color: var(--ink-subtle);
  background: var(--surface);
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.domain-pill.is-empty:not(.is-active) { opacity: 0.6; }
.domain-pill.is-empty:not(.is-active) .domain-pill__ico { filter: grayscale(0.7); }
.domain-pill.is-active {
  background: var(--surface);
  border-color: var(--dom-color, var(--ink));
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--dom-color, var(--ink)), var(--shadow-xs);
}
.domain-pill.is-active .domain-pill__ico {
  background: var(--dom-color, var(--ink));
  color: #fff;
}
.domain-pill.is-active .domain-pill__cnt {
  color: #fff;
  background: var(--dom-color, var(--ink));
  border-color: var(--dom-color, var(--ink));
}

.empty-box__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  color: #fff;
}
.empty-box__ico svg { width: 19px; height: 19px; }

.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cat-head__left {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.cat-head__title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
}
.cat-head__ratio {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-subtle);
}
.cat-head__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cat-head__link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-subtle);
}
.cat-head__link:hover { color: var(--ink); text-decoration: underline; }
.cat-head__toggle {
  border: 0;
  background: transparent;
  padding: 2px;
  color: var(--ink-subtle);
  display: grid;
  place-items: center;
}
.cat-head__chev {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.cat-head__chev.is-collapsed { transform: rotate(180deg); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.cat-tile {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 7px 0 4px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: left;
  transition: background 0.12s, border-color 0.12s, opacity 0.14s;
}
.cat-tile:hover {
  background: var(--surface);
  border-color: var(--border-strong);
}
.cat-tile.is-focused {
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.cat-tile.is-dimmed {
  opacity: 0.45;
  background: transparent;
  border-color: var(--border);
}
.cat-tile.is-dimmed .cat-tile__ico {
  filter: grayscale(1);
  background: #64748b !important;
}
.cat-tile.is-zero:not(.is-focused) {
  opacity: 0.52;
}

.cat-tile__ico {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--tile-color, var(--ink));
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.cat-tile__ico svg { width: 12px; height: 12px; }

.cat-tile__name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-tile.is-focused .cat-tile__name { font-weight: 800; }

.cat-tile__cnt {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}
.cat-tile.is-focused .cat-tile__cnt { color: var(--ink); font-weight: 800; }

/* ============ FEED DIVIDER & MINIMAL NEWS ROWS ============ */
.feed-divider {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.feed-divider__count {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-divider__count strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.feed-divider__count span {
  font-size: 11.5px;
  color: var(--ink-subtle);
}
.feed-divider__sort {
  flex: none;
  height: 25px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 20px 0 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
}

.report-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.news-row {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.12s;
}
.news-row:hover { background: var(--bg); }

.news-row__ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}
.news-row__ico svg { width: 14px; height: 14px; }

.news-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.news-row__head {
  display: flex;
  align-items: center;
  gap: 5px;
}
.news-row__cat {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink);
}
.news-row__age {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-subtle);
  white-space: nowrap;
}
.news-row__title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.38;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-row__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.news-row__loc,
.news-row__loc-btn {
  min-width: 0;
  font-size: 11px;
  color: var(--ink-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-row__loc-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-weight: 600;
}
.news-row__loc-btn:hover { color: var(--ink); text-decoration: underline; }
.news-row__right {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.news-row__sources {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink-muted);
}
.news-row__ext {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-subtle);
  text-decoration: none;
  padding: 1px 4px;
  border-radius: 4px;
}
.news-row__ext:hover { background: var(--surface-soft); color: var(--ink); }

/* ============ NEIGHBORHOOD STATISTICS ============ */
.bairro-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.bairro-kpi {
  padding: 8px 6px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bairro-kpi strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bairro-kpi span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

.mini-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.mini-search:focus-within { background: var(--surface); border-color: var(--ink); }
.mini-search svg { width: 14px; height: 14px; color: var(--ink-subtle); flex: none; }
.mini-search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 12px; }

.bairro-list { display: flex; flex-direction: column; gap: 6px; }
.bairro-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
}
.bairro-card:hover { border-color: var(--border-strong); background: var(--bg); }
.bairro-card.is-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.bairro-card__top { display: flex; align-items: baseline; gap: 6px; }
.bairro-card__rank { font-size: 10.5px; font-weight: 800; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.bairro-card__name { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bairro-card__cnt { flex: none; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bairro-card__cnt small { font-size: 10px; font-weight: 600; color: var(--ink-subtle); }
.bairro-card__bar { width: 100%; height: 4px; border-radius: var(--radius-pill); background: var(--surface-soft); overflow: hidden; display: flex; }
.bairro-bar__seg { height: 100%; }
.bairro-bar__seg--crime { background: var(--crimson); }
.bairro-bar__seg--traffic { background: var(--amber); }
.bairro-bar__seg--evento { background: var(--sage); }
.bairro-card__sub { font-size: 10.5px; color: var(--ink-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bairro-empty { padding: 20px 10px; text-align: center; font-size: 12px; color: var(--ink-subtle); }

/* ============ MAP STAGE ============ */
.map-stage {
  position: absolute;
  inset: 0;
  background: #e9edf2;
  z-index: 5;
  transition: opacity 0.16s ease;
}
body[data-tab="relatorios"] .map-stage {
  opacity: 0;
  pointer-events: none;
}

.map-canvas { width: 100%; height: 100%; z-index: 1; }

.map-reopen-btn {
  display: none;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 22;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.map-reopen-btn__cnt {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

/* Map Top-Left Layer Toggles (Pontos | Bairros) */
.map-toggles {
  position: absolute;
  top: calc(60px + var(--safe-top));
  left: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.11);
  box-shadow: var(--shadow-sm);
}
.map-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 700;
  transition: color 0.13s, background 0.13s;
}
.map-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.map-toggle.is-on { color: var(--ink); }
.map-toggle__track {
  position: relative;
  width: 26px;
  height: 15px;
  border-radius: var(--radius-pill);
  background: #cbd5e1;
  flex: none;
  transition: background 0.15s ease;
}
.map-toggle__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.15s ease;
}
.map-toggle.is-on .map-toggle__track { background: var(--ink); }
.map-toggle.is-on .map-toggle__track::after { transform: translateX(11px); }

/* Map Top-Center Selected Neighborhood Banner */
.map-bairro-banner {
  position: absolute;
  top: calc(104px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  max-width: calc(100% - 24px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.13);
  box-shadow: var(--shadow-md);
}
.map-bairro-banner__pin {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex: none;
  display: grid;
  place-items: center;
}
.map-bairro-banner__pin svg { width: 17px; height: 17px; }
.map-bairro-banner__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.map-bairro-banner__txt strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-bairro-banner__txt span {
  font-size: 11px;
  color: var(--ink-subtle);
}
.map-bairro-banner__btn {
  flex: none;
  height: 29px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
}
.map-bairro-banner__btn:hover { background: var(--surface-soft); }

/* Map Official Climate Alert Card (Hybrid Option 1 + 2: INMET city-wide alerts) */
.map-climate-card {
  --sev-color: #ea580c;
  --sev-bg: #fff7ed;
  position: absolute;
  top: calc(104px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  width: min(440px, calc(100% - 24px));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--sev-color) 32%, rgba(15, 23, 42, 0.12));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14), 0 0 0 1px color-mix(in srgb, var(--sev-color) 12%, transparent);
  overflow: hidden;
}
.map-climate-card--below-banner { top: calc(162px + var(--safe-top)); }
.map-climate-card__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-left: 4px solid var(--sev-color);
  background: linear-gradient(90deg, color-mix(in srgb, var(--sev-color) 9%, #ffffff) 0%, #ffffff 55%);
  text-align: left;
}
.map-climate-card__ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sev-color);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--sev-color) 35%, transparent);
}
.map-climate-card__ico svg { width: 19px; height: 19px; }
.map-climate-card__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-climate-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sev-color);
}
.map-climate-card__title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-climate-card__sub {
  font-size: 11px;
  color: var(--ink-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-climate-card__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--sev-color) 32%, var(--border));
  background: var(--sev-bg);
  color: var(--sev-color);
  font-size: 11px;
  font-weight: 800;
}
.map-climate-card__body {
  border-top: 1px solid var(--border);
  padding: 10px 12px 11px;
  max-height: 290px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
}
.map-climate-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--item-sev, #ca8a04);
  background: var(--bg);
}
.map-climate-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.map-climate-item__sev {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--item-sev, #ca8a04);
}
.map-climate-item__time {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}
.map-climate-item__title { font-size: 12px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.map-climate-item__desc { font-size: 11px; color: var(--ink-muted); line-height: 1.38; margin: 0; }
.map-climate-item__link {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: var(--item-sev, #0369a1);
  text-decoration: none;
}
.map-climate-item__link:hover { text-decoration: underline; }
.map-climate-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  font-size: 11px;
  color: var(--ink-subtle);
}
.map-climate-card__wx-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}
.map-climate-card__wx-btn:hover { background: var(--surface-soft); }

/* Single Weather Emblem Marker anchored on the city (Option 2 touch) */
.climate-city-badge-wrap { background: transparent; border: 0; }
.climate-city-badge {
  --sev-color: #ea580c;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border: 2px solid var(--sev-color);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.28), 0 0 0 5px color-mix(in srgb, var(--sev-color) 22%, transparent);
  transform: translate(-50%, -50%);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.climate-city-badge:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.34), 0 0 0 7px color-mix(in srgb, var(--sev-color) 28%, transparent);
}
.climate-city-badge__ico {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sev-color);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.climate-city-badge__ico svg { width: 15px; height: 15px; }
.climate-city-badge__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.climate-city-badge__txt strong { font-size: 11.5px; font-weight: 800; color: #fff; }
.climate-city-badge__txt small { font-size: 10px; font-weight: 600; color: #cbd5e1; }

.inmet-sev-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: color-mix(in srgb, var(--item-sev, #ca8a04) 14%, transparent);
  color: var(--item-sev, #ca8a04);
}
.map-legend__note {
  margin: 8px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-subtle);
}

/* Neighborhood Map Badges & Tooltips */
.bairro-badge-wrap { background: transparent; border: 0; }
.bairro-map-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transform: translate(-50%, -50%);
  transition: transform 0.13s, background 0.13s;
}
.bairro-map-badge strong {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.bairro-map-badge.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.bairro-map-badge.is-selected strong {
  background: #fff;
  color: var(--ink);
}

.radar-pin--outside {
  opacity: 0.48;
  transform: translate(-50%, -50%) scale(0.88);
}
.radar-pin--outside:hover {
  opacity: 1;
}

/* National Overview Progressive Zoom Rings (State -> Municipality) */
.overview-ring-wrap { background: transparent; border: 0; }
.overview-ring {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translate(-20px, -50%);
  cursor: pointer;
}
.overview-ring--compact {
  flex-direction: column;
  gap: 2px;
  transform: translate(-50%, -50%);
}
.overview-ring--compact .overview-ring__label {
  padding: 1px 5px;
  font-size: 9.5px;
  line-height: 1.25;
}
.overview-ring__circle {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.32));
  transition: transform 0.14s ease;
}
.overview-ring:hover .overview-ring__circle { transform: scale(1.12); }
.overview-ring__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.overview-ring__label {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}
.overview-ring--city .overview-ring__label {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.overview-hint {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px;
}
.overview-hint strong { font-size: 12px; font-weight: 800; color: var(--ink); }
.overview-hint span { font-size: 11.5px; color: var(--ink-subtle); line-height: 1.4; }

.city-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
}
.city-context-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 2px 6px 2px 2px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-subtle);
  flex: none;
}
.city-context-bar__back:hover { color: var(--ink); background: var(--surface); }
.city-context-bar__name {
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-row-badge {
  min-width: 34px;
  height: 26px;
  padding: 0 7px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex: none;
  font-variant-numeric: tabular-nums;
}

.mobile-status-strip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 14;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.feed-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  flex: none;
}

.map-fabs {
  position: absolute;
  right: 12px;
  top: calc(62px + var(--safe-top));
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-fab {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
}
.map-fab .ico { width: 15px; height: 15px; }
.map-fab small { font-size: 9px; font-weight: 700; color: var(--ink-subtle); line-height: 1; }

.map-controls-bar { display: none; }

/* ============ BADGES & POPUPS ============ */
.event-card__type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.event-card__type svg { width: 11px; height: 11px; flex: none; }
.event-card__date { font-size: 10.5px; font-weight: 600; color: var(--ink-subtle); white-space: nowrap; }

.recent-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: #fee2e2;
  color: var(--crimson-dark);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
}
.prec-pill { display: inline-flex; padding: 1px 6px; border-radius: var(--radius-pill); font-size: 9.5px; font-weight: 700; }
.prec-pill--rua { background: var(--surface-soft); color: var(--ink); }
.prec-pill--bairro { background: transparent; color: var(--ink-subtle); border: 1px dashed var(--border-strong); }
.prec-pill--cidade { background: #eff6ff; color: #1e40af; border: 1px dashed #93c5fd; }
.free-pill { display: inline-flex; padding: 2px 6px; border-radius: var(--radius-pill); background: #dcfce7; color: #166534; font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.active-event-pill { display: inline-flex; padding: 2px 6px; border-radius: var(--radius-pill); background: #d1fae5; color: #065f46; font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.pf-pill { display: inline-flex; padding: 1px 5px; border-radius: 4px; background: #dbeafe; color: #1e3a8a; font-size: 9.5px; font-weight: 800; }
.origin-pill { display: inline-flex; padding: 1px 5px; border-radius: 4px; font-size: 9.5px; font-weight: 700; }
.origin-pill--oficial { background: #e0e7ff; color: #3730a3; }
.origin-pill--ssp { background: #e2e8f0; color: #334155; }
.origin-pill--agenda { background: #d1fae5; color: #065f46; }
.origin-pill--alerta { background: #fef3c7; color: #92400e; }
.multi-source-pill { display: inline-flex; padding: 1px 5px; border-radius: 4px; background: var(--surface-soft); color: var(--ink-muted); font-size: 9.5px; font-weight: 700; }
.grav-pill { display: inline-flex; padding: 1px 6px; border-radius: var(--radius-pill); font-size: 9.5px; font-weight: 800; text-transform: uppercase; }
.grav-pill--fatal { background: #fee2e2; color: #7f1d1d; }
.grav-pill--grave { background: #ffedd5; color: #9a3412; }
.grav-pill--leve { background: #fef3c7; color: #92400e; }
.grav-pill--sem_vitimas { background: #f1f5f9; color: #475569; }

.empty-box {
  padding: 28px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-box h3 { margin: 0; font-family: var(--font-serif); font-size: 15.5px; }
.empty-box p { margin: 0; font-size: 12px; color: var(--ink-muted); max-width: 260px; }

/* ============ SOBER LEAFLET MARKERS & POPUPS ============ */
.leaflet-container { font-family: var(--font-sans) !important; background: #e9edf2; }
.leaflet-control-zoom { display: none; }
.leaflet-control-attribution { font-size: 9px !important; background: rgba(255, 255, 255, 0.72) !important; }

.radar-pin-wrap { background: transparent; border: 0; }
.radar-pin {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.radar-pin--traffic { border-radius: 6px; }
.radar-pin--servico { border-radius: 7px 7px 7px 2px; }
.radar-pin--clima { border-radius: 50% 50% 50% 4px; }
.radar-pin--emprego { border-radius: 9px; }
.radar-pin svg { width: 13.5px; height: 13.5px; }
.radar-pin--approx { outline: 1.5px dashed rgba(15, 23, 42, 0.45); outline-offset: 2px; }
.radar-pin--cidade { opacity: 0.6; outline: 1.5px dotted rgba(15, 23, 42, 0.6); filter: saturate(0.65); }
.radar-pin--recent { box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.28), 0 2px 10px rgba(15, 23, 42, 0.3); }
.radar-pin--active { box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.26), 0 2px 10px rgba(15, 23, 42, 0.28); }
.radar-pin:hover,
.radar-pin.is-highlighted {
  transform: translate(-50%, -50%) scale(1.24);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 6px 16px rgba(15, 23, 42, 0.36);
}

.leaflet-popup-content-wrapper {
  border-radius: 13px !important;
  box-shadow: var(--shadow-md) !important;
  border: 1px solid var(--border);
  padding: 0 !important;
}
.leaflet-popup-content { margin: 0 !important; min-width: 225px; max-width: 280px; }
.event-popup { padding: 12px 13px; }
.event-popup__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.event-popup__title { margin: 0 0 5px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.event-popup__loc { margin: 0 0 6px; font-size: 11.5px; color: var(--ink-muted); }
.event-popup__desc { margin: 0 0 7px; font-size: 11.5px; color: var(--ink-muted); line-height: 1.42; }
.event-popup__meta { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border); font-size: 11px; }
.event-popup__pills { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.event-popup__source { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.event-popup__source > span { color: var(--ink-subtle); font-weight: 600; }
.event-popup__source a { color: var(--ink); font-weight: 700; text-decoration: none; }
.event-popup__source a:hover { text-decoration: underline; }
.event-popup__actions { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.event-popup__map-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.map-ext-link,
.waze-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.waze-link {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.28);
  color: #0369a1 !important;
}
.waze-link:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(2, 132, 199, 0.5);
}
.map-ext-link--maps {
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.28);
  color: #0f766e !important;
}
.map-ext-link--maps:hover {
  background: rgba(15, 118, 110, 0.18);
  border-color: rgba(15, 118, 110, 0.5);
}
.map-ext-link--street {
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(180, 83, 9, 0.28);
  color: #b45309 !important;
}
.map-ext-link--street:hover {
  background: rgba(217, 119, 6, 0.18);
  border-color: rgba(180, 83, 9, 0.5);
}

/* Live Traffic (TomTom) incident markers & pills */
.live-traffic-pin-wrap { background: transparent; border: 0; }
.live-traffic-pin {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.3);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.live-traffic-pin svg { width: 11.5px; height: 11.5px; transform: rotate(-45deg); }
.live-traffic-pin:hover {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 4px 12px rgba(15, 23, 42, 0.35);
}
.live-traffic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
}
.live-traffic-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #16a34a;
}
.delay-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  font-size: 10px;
  font-weight: 800;
}

/* ============ MOBILE BOTTOM NAV ============ */
.bottom-nav {
  position: relative;
  flex: none;
  width: 100%;
  height: var(--bottom-nav-h);
  padding-bottom: var(--safe-bottom);
  z-index: 40;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  display: flex;
}
.bottom-nav__btn {
  flex: 1;
  position: relative;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-subtle);
  font-size: 10.5px;
  font-weight: 700;
}
.bottom-nav__btn .ico { width: 20px; height: 20px; }
.bottom-nav__btn.is-active { color: var(--ink); }
.bottom-nav__btn.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2.5px;
  border-radius: 0 0 4px 4px;
  background: var(--ink);
}
.bottom-nav__pill {
  position: absolute;
  top: 5px;
  right: calc(50% - 26px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: var(--ink);
  color: #fff;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* ============ STATUS MODAL ============ */
.feed-pill--btn { cursor: pointer; transition: background 0.14s, border-color 0.14s; }
.feed-pill--btn:hover { background: var(--surface-soft); border-color: var(--border-strong); }

.status-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.status-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); }
.status-modal__card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(82vh, 680px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.status-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.status-modal__head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.status-modal__head p { margin: 2px 0 0; font-size: 12px; color: var(--ink-subtle); }
.status-modal__head-actions { display: flex; align-items: center; gap: 8px; }
.status-modal__refresh { height: 28px; padding: 0 11px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--bg); font-size: 11.5px; font-weight: 700; color: var(--ink-muted); }
.status-modal__close { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); font-size: 18px; line-height: 1; color: var(--ink-muted); display: grid; place-items: center; }
.status-modal__body { padding: 14px 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.status-modal__loading { margin: 12px 0; font-size: 13px; color: var(--ink-muted); text-align: center; }
.status-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 540px) { .status-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.status-kpi { padding: 10px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.status-kpi__label { font-size: 10px; font-weight: 700; color: var(--ink-subtle); text-transform: uppercase; }
.status-kpi__val { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.status-kpi__sub { font-size: 10.5px; color: var(--ink-muted); }
.status-runs__title { margin: 0 0 8px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--ink-subtle); }
.status-runs__list { display: flex; flex-direction: column; gap: 6px; }
.status-run { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; }
.status-run__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.status-run__name { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-run__meta { font-size: 11px; color: var(--ink-subtle); }
.status-run__stats { text-align: right; flex: none; display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.status-run__novos { font-weight: 800; }
.status-badge { display: inline-flex; padding: 1px 6px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.status-badge--ok { background: #dcfce7; color: #166534; }
.status-badge--partial { background: #fef3c7; color: #92400e; }
.status-badge--error { background: #fee2e2; color: #991b1b; }
.status-badge--running { background: #dbeafe; color: #1e40af; }

/* ============ DESKTOP DOCKED WORKSPACE (>= 860px) ============ */
@media (min-width: 860px) {
  .app-header {
    position: static;
    height: var(--topbar-h);
    padding: 0 16px;
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border) !important;
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(240px, 340px) 1fr;
    align-items: center;
    gap: 16px;
  }

  .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
  .brand__mark { width: 32px; height: 32px; display: grid; place-items: center; }
  .brand__mark svg { width: 100%; height: 100%; }
  .brand__text { display: flex; flex-direction: column; line-height: 1.15; }
  .brand__text strong { font-family: var(--font-serif); font-size: 17.5px; font-weight: 600; letter-spacing: -0.02em; }
  .brand__text small { font-size: 10.5px; color: var(--ink-subtle); font-weight: 600; }

  .city-combo__trigger {
    height: 34px !important;
    background: var(--bg) !important;
    box-shadow: none !important;
    border-color: var(--border) !important;
  }
  .icon-pill-btn {
    width: 34px !important;
    height: 34px !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    border-color: var(--border) !important;
  }
  .icon-pill-btn:hover { background: var(--bg) !important; }

  .header-desktop-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .feed-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 0 11px;
    white-space: nowrap;
  }

  /* Docked 2-column grid: Left Sidebar + Full Map */
  .workspace {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    transition: grid-template-columns 0.18s ease;
  }
  body.is-left-collapsed .workspace {
    grid-template-columns: 0px minmax(0, 1fr);
  }

  .left-panel {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    inset: auto;
    padding-top: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    border-right: 1px solid var(--border);
  }
  body.is-left-collapsed .left-panel {
    border-right: 0;
    overflow: hidden;
  }

  .left-panel__collapse { display: grid; }

  .map-stage {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    inset: auto;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.is-left-collapsed .map-reopen-btn { display: inline-flex; }
  .map-toggles { top: 14px; left: 14px; }
  body.is-left-collapsed .map-toggles { left: 136px; }
  .map-bairro-banner { top: 14px; }
  .map-climate-card {
    top: 14px;
    right: 14px;
    left: auto;
    transform: none;
    width: min(370px, calc(100% - 28px));
  }
  .map-climate-card--below-banner { top: 14px; }

  .map-fabs, .mobile-status-strip, .bottom-nav { display: none !important; }

  .map-controls-bar {
    display: flex;
    position: absolute;
    bottom: 14px;
    left: 14px;
    right: 60px;
    z-index: 12;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    pointer-events: none;
  }
  .map-controls-bar > * { pointer-events: auto; }
  .map-pill-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
  }
  .map-pill {
    border: 0;
    background: transparent;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-muted);
  }
  .map-pill.is-active { background: var(--ink); color: #fff; }

  .map-fit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.95);
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
  }
  .leaflet-control-zoom {
    display: block;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 14px !important;
    margin-right: 14px !important;
  }
  .leaflet-control-zoom a {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    color: var(--ink) !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  .toast { bottom: 20px; }
}

/* ============ TEMPO (Open-Meteo): WIDGET NO CABEÇALHO + PAINEL ============ */
.weather-pill {
  --wx-tone: #0369a1;
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.weather-pill[hidden] { display: none; }
.weather-pill[data-tone="sun"] { --wx-tone: #d97706; }
.weather-pill[data-tone="cloud"] { --wx-tone: #64748b; }
.weather-pill[data-tone="rain"] { --wx-tone: #0369a1; }
.weather-pill[data-tone="storm"] { --wx-tone: #6d28d9; }
.weather-pill:hover { border-color: var(--border-strong); }
.weather-pill__ico { width: 22px; height: 22px; color: var(--wx-tone); display: grid; place-items: center; }
.weather-pill__ico svg { width: 22px; height: 22px; }
.weather-pill__temp { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.weather-pill__txt { display: none; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.weather-pill__alert {
  position: absolute;
  top: -5px;
  right: -1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d97706;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.weather-pill__alert[hidden] { display: none; }

@media (min-width: 860px) {
  .app-header { grid-template-columns: auto 1fr auto; }
  .weather-pill {
    height: 34px;
    background: var(--surface);
    box-shadow: none;
    border-color: var(--border);
  }
  .weather-pill:hover { background: var(--bg); }
  .weather-pill__ico, .weather-pill__ico svg { width: 19px; height: 19px; }
  .weather-pill__temp { font-size: 13px; }
}
@media (min-width: 1100px) {
  .weather-pill__txt { display: inline; }
}

.weather-card { width: min(560px, 100%); }
.weather-card .status-modal__body { gap: 16px; }

.wx-now {
  --wx-tone: #0369a1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
  padding: 14px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--wx-tone) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--wx-tone) 18%, var(--border));
}
.wx-now[data-tone="sun"], [data-tone="sun"] { --wx-tone: #d97706; }
.wx-now[data-tone="cloud"], [data-tone="cloud"] { --wx-tone: #64748b; }
.wx-now[data-tone="rain"], [data-tone="rain"] { --wx-tone: #0369a1; }
.wx-now[data-tone="storm"], [data-tone="storm"] { --wx-tone: #6d28d9; }
.wx-now__ico { width: 54px; height: 54px; color: var(--wx-tone); }
.wx-now__ico svg { width: 54px; height: 54px; }
.wx-now__main { display: flex; flex-direction: column; line-height: 1.15; }
.wx-now__temp { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wx-now__label { font-size: 13.5px; font-weight: 700; }
.wx-now__feels { font-size: 11.5px; color: var(--ink-subtle); font-weight: 600; }
.wx-now__grid {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.wx-now__grid div { padding: 7px 8px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); }
.wx-now__grid dt { font-size: 10px; font-weight: 700; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 0.03em; }
.wx-now__grid dd { margin: 2px 0 0; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .wx-now__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wx-h, .wx-section-head h4 { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--ink); }
.wx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wx-link { border: 0; background: transparent; padding: 0; font-size: 11.5px; font-weight: 700; color: #6d28d9; cursor: pointer; }
.wx-link:hover { text-decoration: underline; }

.wx-alerts { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; }
.wx-alert { display: flex; align-items: center; gap: 9px; }
.wx-alert__ico { width: 24px; height: 24px; border-radius: 7px; color: #fff; display: grid; place-items: center; flex: none; }
.wx-alert__ico svg { width: 14px; height: 14px; }
.wx-alert__txt { display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; }
.wx-alert__txt small { color: #92400e; font-weight: 600; font-size: 11px; }

.wx-periods {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78px, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.wx-period {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-align: center;
}
.wx-period__when { display: flex; flex-direction: column; font-size: 11px; font-weight: 800; line-height: 1.15; }
.wx-period__when small { font-size: 10px; font-weight: 600; color: var(--ink-subtle); }
.wx-period__ico, .wx-day__ico { color: var(--wx-tone, #64748b); display: grid; place-items: center; }
.wx-period__ico svg { width: 26px; height: 26px; }
.wx-period__temp { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wx-period__temp small { font-size: 11px; font-weight: 600; color: var(--ink-subtle); }

.wx-rain { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: #0369a1; font-variant-numeric: tabular-nums; }
.wx-rain svg { width: 11px; height: 11px; }
.wx-rain small { font-weight: 600; color: var(--ink-subtle); }

.wx-days { display: flex; flex-direction: column; }
.wx-day {
  display: grid;
  grid-template-columns: 78px 26px minmax(90px, 1fr) 30px minmax(60px, 1.4fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.wx-day:last-child { border-bottom: 0; }
.wx-day__name { font-weight: 700; }
.wx-day__ico svg { width: 22px; height: 22px; }
.wx-day__min { text-align: right; color: var(--ink-subtle); font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-day__max { font-weight: 800; font-variant-numeric: tabular-nums; }
.wx-day__bar { position: relative; height: 5px; border-radius: 3px; background: var(--surface-soft); }
.wx-day__bar span { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #f59e0b); }
@media (max-width: 480px) {
  .wx-day { grid-template-columns: 64px 24px 1fr 28px 28px; }
  .wx-day__bar { display: none; }
}

.wx-attr { margin: 0; font-size: 10.5px; color: var(--ink-subtle); }
.wx-attr a { color: inherit; font-weight: 700; }

/* ============ COBERTURA: matérias agrupadas no mesmo caso ============ */
.coverage { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 7px; }
.coverage summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  list-style: none;
}
.coverage summary::-webkit-details-marker { display: none; }
.coverage summary::before { content: "▸ "; color: var(--ink-subtle); }
.coverage[open] summary::before { content: "▾ "; }
.coverage ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.coverage li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 11px;
}
.coverage__src { font-weight: 800; color: var(--ink); }
.coverage__title { grid-column: 1; color: var(--ink-muted); line-height: 1.3; }
.coverage li a { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; white-space: nowrap; }

/* ============ MAP LEGEND (minimalist horizontal pill beside Enquadrar) ============ */
.map-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  white-space: nowrap;
}
.map-legend[hidden] { display: none; }
.map-legend__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  padding-right: 8px;
  border-right: 1px solid var(--border);
}
.map-legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.map-legend__row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink);
  cursor: default;
}
.map-legend__row strong { font-weight: 700; }
.map-legend__cnt {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}
.map-legend__sample {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.radar-pin--sample {
  transform: none !important;
  width: 16px;
  height: 16px;
  border-width: 1.5px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
}
.radar-pin--sample svg { width: 9px; height: 9px; }
.radar-pin--sample:hover { transform: none !important; }

/* ==================== CAMADA EMPREGOS (chips de perfil, pinos agrupados, card cidade) ==================== */
.job-level-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.job-level-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.job-level-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface);
}
.job-level-chip.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.job-level-chip.is-zero:not(.is-active) {
  opacity: 0.55;
}
.job-level-chip__cnt {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.radar-pin--cluster {
  position: relative;
}
.radar-pin__cnt {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  border: 1.5px solid #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

.job-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.job-badge--aprendiz {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.job-badge--inicio {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.job-badge--experiencia {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.job-badge--lideranca {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.job-badge--remoto {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}
.job-badge--salario {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.job-badge--consultoria {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.job-company-popup__list {
  list-style: none;
  margin: 8px 0 6px;
  padding: 0;
  max-height: 215px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.job-company-popup__item {
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-company-popup__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.job-company-popup__area {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-subtle);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.job-company-popup__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.job-company-popup__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.job-company-popup__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.job-company-popup__link {
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
}
.job-company-popup__link:hover { text-decoration: underline; }

.map-jobs-card .map-climate-item__link {
  color: #0f766e;
}
.map-jobs-item__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
