/* Tema v3.0 — fontes e componentes do novo layout (header, menu lateral, cartões).
   Carregado por último em config/views.php: sobrescreve style.css e L.Control.Layers.Tree.css. */

/* ── Fontes (vendorizadas: funcionam offline/PWA) ─────────────────────────── */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('vendor/fonts/open-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('vendor/fonts/open-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Itálico real: sem ele o navegador inclina a fonte normal e o texto fica deformado. */
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('vendor/fonts/open-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url('vendor/fonts/open-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mapa (tooltips, popups, controles) usa a mesma fonte do sistema, não a Helvetica/Arial do leaflet.css. */
.leaflet-container { font-family: var(--zee-font); }

/* ── Medidas do layout (cores, raios e sombras: theme-tokens.css) ─────────── */
:root {
  --zee-header-h: 60px;
  --zee-side-w: 252px;
  --zee-side-w-collapsed: 52px;
  --zee-cards-w: 290px;
  --zee-map-gap: 8px;
}

body {
  background: var(--zee-bg);
  color: var(--zee-text);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.wrapper .header {
  /* Lavrado de Roraima (Gabriel Marcusso, CC BY-SA 4.0): faixa 10.3:1 à direita, dissolvendo no fundo à esquerda */
  --zee-header-img-w: calc(var(--zee-header-h) * 10.3);
  --zee-header-veil: transparent;
  height: var(--zee-header-h);
  background:
    linear-gradient(90deg,
      var(--zee-surface) calc(100% - var(--zee-header-img-w)),
      var(--zee-header-veil) calc(100% - var(--zee-header-img-w) * 0.7)),
    url('../img/header-lavrado.webp') right center / auto 100% no-repeat,
    var(--zee-surface);
  border-bottom: 1px solid var(--zee-border);
  box-shadow: var(--zee-shadow-sm);
}

:root[data-theme="escuro"] .wrapper .header {
  --zee-header-veil: color-mix(in srgb, var(--zee-surface) 40%, transparent);
}

.wrapper .header .header-menu {
  position: relative;
  justify-content: flex-start;
  gap: 14px;
  padding: 0 16px;
}

.zee-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--zee-text);
}

.zee-brand img {
  display: block;
  height: 40px;
  width: auto;
}

.zee-brand-sub {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--zee-text);
  border-left: 1px solid var(--zee-border);
  padding-left: 10px;
}

.zee-drawer-btn {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: transparent;
  color: var(--zee-text);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Título só aparece com painel externo aberto, no lugar da busca. */
.header-title {
  display: none;
  position: static;
  transform: none;
  margin: 0 auto;
  color: var(--zee-text);
  font-size: 13px;
  font-weight: 600;
  max-width: none;
}
.zee-external-open .header-title { display: block; }
.zee-external-open .zee-search { display: none; }

/* Busca — recolhida mostra só lupa + GPS centralizados no header; ao expandir cresce
   para a esquerda (borda direita fixa no centro + 36px) e abre o painel de coordenadas.
   --zee-search-room limita a largura aberta para não cobrir a marca. */
.zee-search {
  --zee-search-room: calc(50% - 300px);
  position: absolute;
  top: 50%;
  right: calc(50% - 36px);
  transform: translateY(-50%);
  width: 72px;
  max-width: 350px;
  margin: 0;
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius);
  box-shadow: var(--zee-shadow-sm);
  transition: width 220ms ease;
}
.zee-search.is-open,
.zee-search.is-filled { width: max(200px, min(350px, var(--zee-search-room))); }

/* Com a busca fora do fluxo, as abas + conta vão para a direita sozinhas. */
.zee-tabs { margin-left: auto; }

.zee-search-toggle {
  flex: none;
  width: 34px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--zee-text-muted);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--zee-radius) 0 0 var(--zee-radius);
}
.zee-search-toggle:hover,
.zee-search.is-open .zee-search-toggle,
.zee-search.is-filled .zee-search-toggle { color: var(--zee-brand-800); }

.zee-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  color: var(--zee-text);
  outline: none;
  opacity: 0;
  transition: opacity 150ms ease;
}
.zee-search.is-open .zee-search-input,
.zee-search.is-filled .zee-search-input { padding: 0 8px 0 0; opacity: 1; }
.zee-search-input::placeholder { color: var(--zee-text-faint); }
.zee-search:focus-within { border-color: var(--zee-brand-700); box-shadow: var(--zee-focus-ring), var(--zee-shadow-sm); }

.zee-search-gps {
  flex: none;
  width: 34px;
  height: 26px;
  margin-right: 3px;
  border: 0;
  border-left: 1px solid var(--zee-border);
  background: transparent;
  color: var(--zee-text-muted);
  font-size: 14px;
  cursor: pointer;
}
.zee-search-gps:hover,
.zee-search-gps.is-active { color: var(--zee-brand-800); }

/* Animações dos ícones da busca: GPS gira 360° no hover; a lupa gira 180° ao abrir (e volta
   ao fechar) e sacode ao pesquisar (.is-shaking, posta por search-icon-anim.js). */
.zee-search-gps i { display: inline-block; }
.zee-search-gps:hover i { animation: zee-gps-spin 600ms ease-in-out; }
@keyframes zee-gps-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.zee-search-toggle i {
  display: inline-block;
  transition: transform 350ms ease;
}
.zee-search.is-open .zee-search-toggle i { transform: rotate(180deg); }
.zee-search-toggle i.is-shaking { animation: zee-lupa-shake 450ms ease-in-out; }
.zee-search.is-open .zee-search-toggle i.is-shaking { animation-name: zee-lupa-shake-open; }
@keyframes zee-lupa-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: translateX(-2px) rotate(-14deg); }
  40% { transform: translateX(2px) rotate(12deg); }
  60% { transform: translateX(-2px) rotate(-8deg); }
  80% { transform: translateX(1px) rotate(4deg); }
}
@keyframes zee-lupa-shake-open {
  0%, 100% { transform: rotate(180deg); }
  20% { transform: translateX(-2px) rotate(166deg); }
  40% { transform: translateX(2px) rotate(192deg); }
  60% { transform: translateX(-2px) rotate(172deg); }
  80% { transform: translateX(1px) rotate(184deg); }
}
@media (prefers-reduced-motion: reduce) {
  .zee-search-gps:hover i,
  .zee-search-toggle i.is-shaking { animation: none; }
  .zee-search-toggle i { transition: none; }
}

/* Painel abaixo da busca: resultados de município + busca por lat/lon. */
.zee-search-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius);
  box-shadow: var(--zee-shadow);
  z-index: 100001;
  transform-origin: top right;
  transform: scale(0.6, 0);
  opacity: 0;
  visibility: hidden;
  transition: transform 200ms ease, opacity 150ms ease, visibility 0s linear 200ms;
}
.zee-search.is-open .zee-search-drop {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 220ms ease 80ms, opacity 150ms ease 80ms, visibility 0s;
}
/* Com texto digitado, o painel de lat/lon some; sem resultados, o painel inteiro some. */
.zee-search.has-text .zee-coord-search { display: none; }
.zee-search.has-text .zee-search-results { border-bottom: 0; }
.zee-search.is-open.has-text:not(.has-results) .zee-search-drop {
  opacity: 0;
  visibility: hidden;
}

.wrapper .header .header-menu .zee-search-results {
  display: block;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  margin: 0;
  border-bottom: 1px solid var(--zee-border);
}
.wrapper .header .header-menu .zee-search-results[hidden] { display: none; }

.zee-coord-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.zee-coord-format,
.zee-coord-input {
  width: 100%;
  min-width: 0;
  height: 32px;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  color: var(--zee-text);
  font-size: 13px;
}
.zee-coord-format { cursor: pointer; }
.zee-coord-format:focus,
.zee-coord-input:focus { outline: none; border-color: var(--zee-brand-700); box-shadow: var(--zee-focus-ring); }
.zee-coord-fields { display: flex; gap: 8px; }
.zee-coord-go {
  height: 34px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: var(--zee-brand-800);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.zee-coord-go:hover { background: var(--zee-brand-700); }
.zee-coord-go i { margin-right: 6px; }
.zee-search-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--zee-radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.zee-search-results li i { width: 16px; color: var(--zee-brand-800); text-align: center; }
.zee-search-results li small { display: block; font-size: 11px; color: var(--zee-text-muted); }
.zee-search-results li:hover,
.zee-search-results li.is-active { background: var(--zee-brand-50); }
.zee-search-results .zee-search-empty { color: var(--zee-text-muted); cursor: default; font-size: 12px; }
/* Palavra pesquisada destacada nos resultados (search-highlight.js) — dourado do tema. */
.zee-search-mark {
  background: color-mix(in srgb, var(--zee-flash) 45%, transparent);
  color: inherit;
  font-weight: 600;
  border-radius: 3px;
  padding: 0 1px;
}
.zee-search-results .zee-search-empty:hover { background: transparent; }

/* Abas + conta */
.zee-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex-shrink: 0;
}

.zee-tab,
.wrapper .header .auth-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 54px;
  height: 50px;
  padding: 0 6px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: transparent;
  color: var(--zee-text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}
/* Repouso: só o ícone, maior. Hover/foco: ícone reduz e o rótulo surge junto com o widget. */
.zee-tab i,
.wrapper .header .auth-btn i { font-size: 22px; transition: font-size 150ms ease; }
.zee-tab span,
.wrapper .header .auth-btn .zee-auth-label {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 150ms ease, opacity 150ms ease;
}
.zee-tab:hover,
.zee-tab:focus-visible,
.wrapper .header .auth-btn:hover,
.wrapper .header .auth-btn:focus-visible { background: var(--zee-brand-50); }
.zee-tab:hover i,
.zee-tab:focus-visible i,
.wrapper .header .auth-btn:hover i,
.wrapper .header .auth-btn:focus-visible i { font-size: 15px; }
.zee-tab:hover span,
.zee-tab:focus-visible span,
.wrapper .header .auth-btn:hover .zee-auth-label,
.wrapper .header .auth-btn:focus-visible .zee-auth-label { max-height: 16px; opacity: 1; }
.zee-tab.is-active { color: var(--zee-brand-800); font-weight: 600; }
.zee-tab.is-active i { color: var(--zee-brand-700); }
/* Tema escuro: ícones do header continuam escuros (como no claro) sobre a ilustração de fundo. */
:root[data-theme="escuro"] .zee-tab,
:root[data-theme="escuro"] .wrapper .header .auth-btn,
:root[data-theme="escuro"] .wrapper .header .tools-menu-btn { color: #1d2a24; }
:root[data-theme="escuro"] .zee-tab.is-active,
:root[data-theme="escuro"] .zee-tab.is-active i,
:root[data-theme="escuro"] .wrapper .header .auth-btn--logged { color: var(--zee-brand-900); }
/* Hover/foco (widget aparece): fundo preto, ícone e rótulo brancos. */
:root[data-theme="escuro"] .zee-tab:hover,
:root[data-theme="escuro"] .zee-tab:focus-visible,
:root[data-theme="escuro"] .zee-tab[aria-expanded="true"],
:root[data-theme="escuro"] .wrapper .header .auth-btn:hover,
:root[data-theme="escuro"] .wrapper .header .auth-btn:focus-visible,
:root[data-theme="escuro"] .wrapper .header .tools-menu-btn:hover,
:root[data-theme="escuro"] .wrapper .header .tools-menu-btn[aria-expanded="true"] { background: #000; color: #fff; }
:root[data-theme="escuro"] .zee-tab:hover i,
:root[data-theme="escuro"] .zee-tab:focus-visible i,
:root[data-theme="escuro"] .zee-tab[aria-expanded="true"] i { color: #fff; }

.header-auth { gap: 8px; flex-shrink: 0; }

/* Menu de Configurações (engrenagem) — settings-menu.js */
.zee-settings-wrap { position: relative; display: flex; }
.zee-settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  box-shadow: var(--zee-shadow-lg);
  z-index: 100000;
}
.zee-settings-dropdown[hidden] { display: none; }
.zee-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--zee-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}
.zee-settings-row:hover { background: var(--zee-accent-soft); }
.zee-settings-action { border-top: 1px solid var(--zee-border); border-radius: 0 0 6px 6px; margin-top: 4px; }
.zee-settings-label { display: flex; align-items: center; gap: 9px; }
.zee-settings-label i { width: 14px; text-align: center; color: var(--zee-text-muted); }
.zee-settings-chevron { font-size: 11px; color: var(--zee-text-faint); }

/* Modal Layout do sistema — escolha de cor */
.zee-color-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.zee-color-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 2px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  color: var(--zee-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease;
}
.zee-color-option:hover { border-color: var(--zee-border-strong); }
.zee-color-option[aria-checked="true"] { border-color: var(--zee-accent); }
.zee-color-swatch { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }

.zee-switch { position: relative; display: inline-flex; flex-shrink: 0; width: 36px; height: 20px; }
.zee-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.zee-switch-slider {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--zee-border-strong);
  transition: background 150ms ease;
  pointer-events: none;
}
.zee-switch-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--zee-shadow-sm);
  transition: transform 150ms ease;
}
.zee-switch input:checked + .zee-switch-slider { background: var(--zee-accent); }
.zee-switch input:checked + .zee-switch-slider::before { transform: translateX(16px); }
.zee-switch input:focus-visible + .zee-switch-slider { box-shadow: var(--zee-focus-ring); }
.zee-switch input:disabled + .zee-switch-slider { opacity: 0.5; }

.wrapper .header .auth-btn {
  width: auto;
}
.wrapper .header .auth-btn:hover { color: var(--zee-brand-800); }
.wrapper .header .auth-btn--logged { color: var(--zee-brand-800); }
.zee-auth-label { font-size: 11px; white-space: nowrap; }

.auth-welcome { color: var(--zee-text); }

.tools-menu-btn {
  color: var(--zee-text);
  background: var(--zee-surface-glass);
  border: 1px solid var(--zee-border);
}

/* Aviso de homologação: começa sobre o mapa, centralizado (arrastável). */
.homologacao-tooltip {
  top: calc(var(--zee-header-h) + 14px);
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Estrutura: menu lateral + mapa ───────────────────────────────────────── */
.content_main.zee-layout {
  position: fixed;
  top: var(--zee-header-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: var(--zee-bg);
}

.wrapper .zee-layout #map {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  margin: var(--zee-map-gap);
  border-radius: var(--zee-radius);
  box-shadow: var(--zee-shadow-sm);
  overflow: hidden;
}

.wrapper .zee-layout .external-panel {
  flex: 1 1 auto;
  width: auto;
  height: auto;
  margin: 0;
}
.wrapper .zee-layout .external-panel.is-open { display: flex; }
.zee-external-open .zee-sidebar { display: none; }

.zee-sidebar {
  position: relative;
  z-index: 1001;
  flex: 0 0 var(--zee-side-w);
  width: var(--zee-side-w);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--zee-surface);
  border-right: 1px solid var(--zee-border);
  transition: flex-basis 200ms ease, width 200ms ease;
}

.zee-side-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px 8px;
  border-bottom: 1px solid var(--zee-border);
}

.zee-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: transparent;
  color: var(--zee-text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 150ms ease, color 150ms ease;
}
.zee-side-item i { flex: none; width: 18px; font-size: 14px; text-align: center; }
.zee-side-item:hover { background: var(--zee-brand-50); }
.zee-side-item.is-active {
  background: var(--zee-brand-900);
  color: var(--zee-on-primary);
  font-weight: 600;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--zee-brand-900) 22%, transparent);
}

/* Barra de Ferramentas minimizada vira botão ao lado de Camadas (tool-window-dock.js). */
.zee-side-row { display: flex; align-items: center; }
.zee-side-row > .zee-side-item { flex: 1 1 auto; min-width: 0; }
.zee-tool-dock-btn {
  flex: none;
  width: 0;
  height: 34px;
  margin-left: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  color: var(--zee-brand-900);
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: width 280ms cubic-bezier(.4,0,.2,1), margin-left 280ms cubic-bezier(.4,0,.2,1), opacity 150ms ease;
}
.zee-tool-dock-btn.no-anim { transition: none; }
.zee-tool-dock-btn.is-open { width: 34px; margin-left: 6px; }
.zee-tool-dock-btn.is-shown {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--zee-border);
  box-shadow: var(--zee-shadow-sm);
  transition: width 280ms cubic-bezier(.4,0,.2,1), margin-left 280ms cubic-bezier(.4,0,.2,1);
}
.zee-tool-dock-btn:hover { background: var(--zee-brand-50); }
.zee-tool-dock-ghost {
  position: fixed;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: 8px;
  box-shadow: var(--zee-shadow-sm);
  color: var(--zee-brand-900);
  font-size: 14px;
  overflow: hidden;
  pointer-events: none;
}
.geojson-tool-window.geojson-tool-window-docked { visibility: hidden; pointer-events: none; }
/* Menu recolhido (desktop): o botão fica logo abaixo de Camadas e abre na altura. */
@media (min-width: 901px) {
  .zee-sidebar-collapsed .zee-side-row { flex-direction: column; align-items: stretch; }
  .zee-sidebar-collapsed .zee-tool-dock-btn {
    width: auto;
    height: 0;
    margin-left: 0;
    margin-top: 0;
    transition: height 280ms cubic-bezier(.4,0,.2,1), margin-top 280ms cubic-bezier(.4,0,.2,1), opacity 150ms ease;
  }
  .zee-sidebar-collapsed .zee-tool-dock-btn.no-anim { transition: none; }
  .zee-sidebar-collapsed .zee-tool-dock-btn.is-open { width: auto; height: 34px; margin-left: 0; margin-top: 1px; }
  /* Mesmo visual dos itens do menu (.zee-side-item): sem borda, sombra nem fundo. */
  .zee-sidebar-collapsed .zee-tool-dock-btn.is-shown {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
    color: var(--zee-text);
    transition: height 280ms cubic-bezier(.4,0,.2,1), margin-top 280ms cubic-bezier(.4,0,.2,1);
  }
  .zee-sidebar-collapsed .zee-tool-dock-btn.is-shown:hover { background: var(--zee-brand-50); }
}

.zee-side-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.zee-side-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px;
}
.zee-side-panel[hidden] { display: none; }
#zee-layers-slot { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
#zee-layers-slot[hidden] { display: none; }

.zee-side-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.zee-side-hint { font-size: 11.5px; color: var(--zee-text-muted); line-height: 1.45; margin-bottom: 12px; }

.zee-tematicos-list { display: flex; flex-direction: column; gap: 4px; }
.zee-tematico {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  color: var(--zee-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.zee-tematico i { flex: none; width: 26px; height: 26px; border-radius: var(--zee-radius-xs); display: grid; place-items: center; background: var(--zee-brand-100); color: var(--zee-brand-800); font-size: 12px; }
.zee-tematico strong { display: block; font-size: 12.5px; font-weight: 600; }
.zee-tematico small { display: block; font-size: 10.5px; color: var(--zee-text-muted); }
.zee-tematico:hover { border-color: var(--zee-brand-200); background: var(--zee-brand-50); }
.zee-tematico.is-active { border-color: var(--zee-brand-700); background: var(--zee-brand-50); }
.zee-tematico.is-active i { background: var(--zee-brand-800); color: var(--zee-on-primary); }

.zee-relatorios-list { display: flex; flex-direction: column; gap: 4px; }
.zee-relatorios-list a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  color: var(--zee-text);
}
.zee-layers-docked .basemap-select:hover { border-color: var(--zee-border-strong); }
.zee-layers-docked .basemap-select:focus { outline: none; border-color: var(--zee-accent); box-shadow: var(--zee-focus-ring); }
.zee-relatorios-list a:hover { border-color: var(--zee-brand-200); background: var(--zee-brand-50); }
.zee-relatorios-list i { color: var(--zee-danger); font-size: 15px; margin-top: 2px; }
.zee-relatorios-list strong { display: block; font-size: 12px; font-weight: 600; }
.zee-relatorios-list small { display: block; font-size: 10.5px; color: var(--zee-text-muted); }

.zee-side-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--zee-border);
}

.zee-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: var(--zee-brand-900);
  color: var(--zee-on-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 150ms ease;
}
.zee-btn-primary:hover { background: var(--zee-brand-800); }
.zee-btn-primary i { font-size: 13px; }

/* Mesmo formato do botão "Exibir camadas em grupo" da árvore (quadrado arredondado, contorno + fundo). */
.zee-side-collapse {
  position: absolute;
  top: 14px;
  right: -12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: var(--zee-radius-sm);
  border: 1px solid var(--zee-border);
  background: var(--zee-surface);
  color: var(--zee-text-muted);
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.12s, border-color 0.12s;
}
/* Área de clique maior que o desenho do botão (inclusive a metade sobre o mapa). */
.zee-side-collapse::before {
  content: '';
  position: absolute;
  inset: -8px;
}
.zee-side-collapse i { transition: transform 200ms ease; }
.zee-sidebar-collapsed .zee-side-collapse i { transform: rotate(180deg); }
/* Animação do clique (1400ms), em etapas:
   cresce junto com o menu (0–240ms) → diminui (240–460ms) → leve tremida (460–700ms)
   → giro de 360º (700–1120ms), com a seta virando para o novo lado → some (1120–1400ms).
   O sentido do giro vem de --zee-spin (definido no JS: recolher = anti-horário, expandir = horário). */
.zee-side-collapse.is-pulsing { animation: zee-collapse-pulse 1400ms linear; }
.zee-side-collapse.is-pulsing i { transition: transform 420ms ease-in-out 700ms; }
@keyframes zee-collapse-pulse {
  0%   { opacity: 1; transform: scale(1) rotate(0deg);   animation-timing-function: ease-out; }
  17%  { opacity: 1; transform: scale(1.9) rotate(0deg); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); animation-timing-function: ease-in; }
  33%  { opacity: 1; transform: scale(1) rotate(0deg); }
  37%  { transform: scale(1) rotate(-9deg); }
  41%  { transform: scale(1) rotate(9deg); }
  45%  { transform: scale(1) rotate(-6deg); }
  48%  { transform: scale(1) rotate(5deg); }
  50%  { opacity: 1; transform: scale(1) rotate(0deg); animation-timing-function: ease-in-out; }
  80%  { opacity: 1; transform: scale(1) rotate(var(--zee-spin, 360deg)); animation-timing-function: ease; }
  100% { opacity: 0; transform: scale(1) rotate(var(--zee-spin, 360deg)); }
}
/* Depois da animação o botão fica escondido até o mouse sair e voltar ao menu. */
.zee-side-collapse.is-dismissed,
.zee-sidebar:hover .zee-side-collapse.is-dismissed { opacity: 0; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .zee-side-collapse.is-pulsing { animation: none; }
  .zee-side-collapse i,
  .zee-side-collapse.is-pulsing i { transition: none; }
}
/* Só aparece com o mouse sobre o menu lateral ou sobre o próprio botão (ou foco via teclado);
   continua clicável mesmo transparente, para o clique nunca cair no mapa. */
.zee-sidebar:hover .zee-side-collapse,
.zee-side-collapse:hover,
.zee-side-collapse:focus-visible { opacity: 1; }
.zee-side-collapse:hover {
  color: var(--zee-brand-800);
  background: var(--zee-brand-50);
  border-color: var(--zee-brand-700);
}

/* Recolhido: só ícones */
.zee-sidebar-collapsed .zee-sidebar { flex-basis: var(--zee-side-w-collapsed); width: var(--zee-side-w-collapsed); cursor: pointer; }
.zee-sidebar-collapsed .zee-side-nav { padding: 10px 6px; }
.zee-sidebar-collapsed .zee-side-item { padding: 0; justify-content: center; }
.zee-sidebar-collapsed .zee-side-item span,
.zee-sidebar-collapsed .zee-btn-primary span { display: none; }
.zee-sidebar-collapsed .zee-side-body { visibility: hidden; }
.zee-sidebar-collapsed .zee-side-footer { padding: 10px 6px; }

/* ── Árvore de camadas ancorada no menu ───────────────────────────────────── */
.leaflet-control-layers.zee-layers-docked {
  position: static;
  float: none;
  margin: 0;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: var(--zee-text);
  font-size: 12px;
}

.zee-layers-docked .leaflet-layerstree-panel-header {
  padding: 8px 12px 4px;
  background: transparent;
  border-bottom: 0;
}
.zee-layers-docked .leaflet-layerstree-panel-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zee-text-muted);
}
.zee-layers-docked .leaflet-layerstree-minimize-btn { display: none; }

.zee-layers-docked .leaflet-control-layers-list {
  padding: 0 8px 12px 12px;
  overflow-x: hidden !important;
}
.zee-layers-docked .leaflet-control-layers-list::-webkit-scrollbar { width: 6px; }
.zee-layers-docked .leaflet-control-layers-list::-webkit-scrollbar-thumb { background: var(--zee-border-strong); }
.zee-layers-docked .leaflet-control-layers-separator { border-top-color: var(--zee-border); margin: 10px 0 6px; }

.zee-layers-docked .leaflet-control-layers-base,
.zee-layers-docked .leaflet-control-layers-overlays { width: 100%; min-width: 0; }

.zee-layers-docked .leaflet-layerstree-section-title {
  margin: 6px 0 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zee-text-muted);
}

.zee-layers-docked .basemap-select {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  color: var(--zee-text);
}

.zee-layers-docked .leaflet-layerstree-header {
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  padding: 2px 4px;
  border-radius: var(--zee-radius-xs);
}
.zee-layers-docked .leaflet-layerstree-header:hover { background: var(--zee-brand-50); }
.zee-layers-docked .leaflet-layerstree-header label,
.zee-layers-docked .leaflet-layerstree-header-label {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 6px;
}
.zee-layers-docked .leaflet-layerstree-header-name {
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  line-height: 1.35;
  font-size: 12px;
}
/* Checkboxes visíveis da árvore (ex.: "selecionar grupo") como botões de visualizar:
   só o olho = desligado; olho com contorno verde arredondado = ligado. */
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -3px 0 0;
  border: 1.5px solid transparent;
  border-radius: var(--zee-radius-sm);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]::before {
  content: "\f06e"; /* fa-eye */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  color: var(--zee-text-muted);
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:hover { background: var(--zee-brand-50); }
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:hover::before { color: var(--zee-brand-800); }
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:focus-visible {
  outline: 2px solid var(--zee-brand-800);
  outline-offset: 1px;
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:checked,
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:indeterminate {
  background: var(--zee-surface);
  border-color: var(--zee-brand-700);
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:checked::before,
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:indeterminate::before {
  color: var(--zee-text);
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:indeterminate::before {
  content: "\f068"; /* fa-minus */
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox]:disabled { opacity: 0.45; cursor: not-allowed; }

/* Linha da camada (label: nome + fonte) como o próprio botão: o checkbox da camada fica oculto
   (mas focável); solto = desligada, pressionado (afundado) = ligada. O checkbox de "selecionar
   grupo" (manual-select-all) continua visível como botão pequeno. */
.zee-layers-docked .leaflet-layerstree-header:has(> label.leaflet-layerstree-header-label):hover { background: none; }
/* O label fica dentro de um span (entry) do plugin: o span cresce para o botão ocupar a linha toda. */
.zee-layers-docked .leaflet-layerstree-header > span:has(> label.leaflet-layerstree-header-label) {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.zee-layers-docked label.leaflet-layerstree-header-label {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 3px 10px 4px;
  border-radius: var(--zee-radius-sm);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.12s, box-shadow 0.12s;
}
.zee-layers-docked label.leaflet-layerstree-header-label > input.leaflet-control-layers-selector:not(.leaflet-layerstree-manual-select-all) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.zee-layers-docked label.leaflet-layerstree-header-label:hover { background: var(--zee-brand-50); }
.zee-layers-docked label.leaflet-layerstree-header-label:has(> input.leaflet-control-layers-selector:not(.leaflet-layerstree-manual-select-all):focus-visible) {
  outline: 2px solid var(--zee-brand-800);
  outline-offset: 1px;
}
.zee-layers-docked label.leaflet-layerstree-header-label:has(> input.leaflet-control-layers-selector:not(.leaflet-layerstree-manual-select-all):checked) {
  background: var(--zee-bg);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18), inset 0 0 0 1px var(--zee-border-strong);
}
.zee-layers-docked label.leaflet-layerstree-header-label:has(> input.leaflet-control-layers-selector:not(.leaflet-layerstree-manual-select-all):checked) .leaflet-layerstree-header-name {
  transform: translateY(1px);
}
.zee-layers-docked label.leaflet-layerstree-header-label:has(> input.leaflet-control-layers-selector:not(.leaflet-layerstree-manual-select-all):disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-nevershow,
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-hide { display: none; }
.zee-layers-docked .leaflet-layerstree-header-pointer { text-align: left; }
.zee-layers-docked .leaflet-layerstree-closed,
.zee-layers-docked .leaflet-layerstree-opened {
  flex: none;
  width: 14px;
  color: var(--zee-text-faint);
  text-align: center;
  font-weight: 600;
}

.zee-layer-meta {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: var(--zee-text-faint);
}
.zee-layer-meta a {
  color: var(--zee-brand-800) !important;
  text-decoration: none !important;
  font-weight: 600;
  margin: 0 2px;
}
.zee-layer-meta a:hover { text-decoration: underline !important; }

/* Títulos de grupo */
.zee-layers-docked .leaflet-layerstree-header:has(strong),
.zee-layers-docked .leaflet-layerstree-children .leaflet-layerstree-header:has(strong) {
  margin: 5px 0 2px;
  padding: 4px 6px;
  background: transparent;
}
.zee-layers-docked .leaflet-control-layers-overlays > .leaflet-layerstree-node > .leaflet-layerstree-header:has(strong) {
  background: var(--zee-brand-50);
  border: 1px solid var(--zee-brand-100);
}
.zee-layers-docked .leaflet-layerstree-header strong { font-weight: 600; color: var(--zee-brand-900); }

.zee-layers-docked .leaflet-layerstree-children {
  position: relative;
  padding-left: 8px;
  margin-left: 9px;
  border-left: 1px solid var(--zee-border);
}
/* Olho de "selecionar grupo" (subzonas): sai da linha da camada e fica sobre a linha-guia do grupo,
   centralizado nela (a linha passa por trás). Os espaçadores que reservavam seu lugar somem. */
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all {
  position: absolute;
  left: -12.5px; /* centro do botão (24px) sobre a borda de 1px do container */
  z-index: 1;
  box-sizing: border-box;
  background: var(--zee-surface);
}
/* Botão comum (contorno + fundo), com ícone de grupo de camadas; ligado = pressionado (afundado). */
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all {
  border: 1px solid var(--zee-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all::before {
  content: "\f5fd"; /* fa-layer-group */
  font-size: 12px;
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all:hover,
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all.zee-hover {
  background: var(--zee-brand-50);
  border-color: var(--zee-brand-700);
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all:checked {
  background: var(--zee-bg);
  border-color: var(--zee-border-strong);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.zee-layers-docked .leaflet-layerstree-header input[type=checkbox].leaflet-layerstree-manual-select-all:checked::before {
  color: var(--zee-text);
  transform: translateY(1px);
}
/* Linha do grupo pai que serve de atalho de hover do botão de subcamadas (ex.: Diretrizes e Zonas de Uso). */
.zee-layers-docked .leaflet-layerstree-children .leaflet-layerstree-header.zee-subcamadas-proxy {
  border-radius: var(--zee-radius-sm);
  cursor: pointer;
  transition: background-color 0.12s;
}
.zee-layers-docked .leaflet-layerstree-children .leaflet-layerstree-header.zee-subcamadas-proxy:hover {
  background: var(--zee-brand-50);
}
/* Prévia: linhas das camadas que o botão de grupo vai ligar/desligar (hover/foco no botão). */
.zee-layers-docked label.leaflet-layerstree-header-label.zee-group-preview {
  background: var(--zee-brand-50);
  outline: 1px dashed var(--zee-brand-700);
  outline-offset: -1px;
}
.zee-layers-docked .leaflet-layerstree-checkbox-spacer { display: none; }

/* Botão "desmarcar grupo" (lixeira): mesmo estilo do botão de grupo de camadas, alinhado à direita
   (o nome do grupo cresce e empurra o botão para a borda). */
.zee-layers-docked .leaflet-layerstree-header > span:has(> span.leaflet-layerstree-header-label) {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.zee-layers-docked .leaflet-layerstree-clear-group-btn {
  flex: none;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin: -3px 0 0 auto;
  padding: 0;
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  color: var(--zee-text-muted);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.zee-layers-docked .leaflet-layerstree-clear-group-btn i { font-size: 12px; line-height: 1; }
/* Ícone "camadas riscadas" (desmarcar): fa-layer-group + risco diagonal desenhado por CSS, com um
   contorno da cor do fundo do botão para separar o risco do ícone. */
.zee-layers-docked .leaflet-layerstree-clear-group-btn { position: relative; }
.zee-layers-docked .leaflet-layerstree-clear-group-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 17px;
  margin: -8.5px 0 0 -1px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 0 0 1.5px var(--zee-surface);
  transform: rotate(-45deg);
  pointer-events: none;
}
.zee-layers-docked .leaflet-layerstree-clear-group-btn:hover::after { box-shadow: 0 0 0 1.5px var(--zee-brand-50); }
.zee-layers-docked .leaflet-layerstree-clear-group-btn:active::after { box-shadow: 0 0 0 1.5px var(--zee-bg); }
.zee-layers-docked .leaflet-layerstree-clear-group-btn:hover {
  background: var(--zee-brand-50);
  border-color: var(--zee-brand-700);
  color: var(--zee-brand-800);
}
.zee-layers-docked .leaflet-layerstree-clear-group-btn:active {
  background: var(--zee-bg);
  border-color: var(--zee-border-strong);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
}
.zee-layers-docked .leaflet-layerstree-clear-group-btn:focus-visible {
  outline: 2px solid var(--zee-brand-800);
  outline-offset: 1px;
}

/* ── Toolbar do mapa (navegação + ferramentas) ────────────────────────────── */
.geojson-tool-window {
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius);
  box-shadow: var(--zee-shadow-sm);
  backdrop-filter: none;
}
.geojson-tool-window-header {
  background: var(--zee-surface);
  border-bottom: 1px solid var(--zee-border);
  justify-content: center;
  padding: 4px 6px;
}
.geojson-tool-window-toggle {
  border-color: var(--zee-border);
  background: var(--zee-surface);
  color: var(--zee-text-muted);
  border-radius: 6px;
}
.geojson-tool-window-content { zoom: 0.8; padding: 4px; }
/* Barra mais alta que o mapa: o conteúdo rola (max-height definido em script.js). */
.geojson-tool-window { display: flex; flex-direction: column; }
.geojson-tool-window-header { flex-shrink: 0; }
.geojson-tool-window-content {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.geojson-tool-window-content::-webkit-scrollbar { display: none; }
.geojson-tool-window-content.is-drag-scrolling { cursor: grabbing; user-select: none; }
.geojson-tool-divider-line { background: var(--zee-border); margin: 4px 2px; }

.geojson-tool-window .leaflet-touch .link-button,
.leaflet-touch .geojson-tool-window .link-button,
.geojson-tool-window .link-button {
  width: 26px;
  height: 26px;
  padding: 0;
  margin-bottom: 2px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  box-shadow: none;
}
.geojson-tool-window .leaflet-bar { border: 0; box-shadow: none; }
.geojson-tool-window .opacity-panel-toggle + .attr-table-panel-toggle { margin-top: 0; }
/* Botões centralizados na barra (os grupos internos também são colunas centralizadas). */
.geojson-tool-window-content { align-items: center; }
.geojson-tool-window-content > .leaflet-control,
.geojson-tool-window .leaflet-draw-section,
.geojson-tool-window .leaflet-draw-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.geojson-tool-divider-line { align-self: stretch; }
.geojson-tool-window .link-button i { font-size: 15px; color: var(--zee-text-muted); }
.geojson-tool-window .link-button:hover { background: var(--zee-brand-50); }
.geojson-tool-window .link-button:hover i { color: var(--zee-brand-800); }

/* Botão ativo = pressionado (afundado), sem cor de destaque. */
.geojson-tool-window .link-button.legend-panel-toggle-active,
.geojson-tool-window .link-button.zee-card-btn-active,
.geojson-tool-window .link-button.opacity-panel-toggle-active,
.geojson-tool-window .link-button.attr-table-panel-toggle-active {
  background: var(--zee-bg);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18), inset 0 0 0 1px var(--zee-border-strong);
}
.geojson-tool-window .link-button.legend-panel-toggle-active i,
.geojson-tool-window .link-button.zee-card-btn-active i,
.geojson-tool-window .link-button.attr-table-panel-toggle-active i,
.geojson-tool-window .link-button.opacity-panel-toggle-active .opacity-panel-toggle-icon {
  color: var(--zee-text);
  transform: translateY(1px);
}

/* Ferramentas de desenho (Leaflet.draw): troca o sprite (ícones pretos sobre branco fixo) por
   ícones Font Awesome no mesmo padrão dos demais botões — segue o tema claro/escuro. */
.geojson-tool-window .leaflet-draw-toolbar { border: 0; box-shadow: none; }
.geojson-tool-window .leaflet-draw-toolbar a,
.leaflet-touch .geojson-tool-window .leaflet-draw-toolbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  margin-bottom: 2px;
  border: 0;
  border-radius: var(--zee-radius-sm);
  background: var(--zee-surface);
  background-image: none !important;
  color: var(--zee-text-muted);
  text-decoration: none;
}
.geojson-tool-window .leaflet-draw-toolbar a::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 15px;
  line-height: 1;
}
.geojson-tool-window .leaflet-draw-draw-polyline::before { content: '\f715'; }
.geojson-tool-window .leaflet-draw-draw-polygon::before { content: '\f5ee'; }
.geojson-tool-window .leaflet-draw-draw-rectangle::before { content: '\f0c8'; }
.geojson-tool-window .leaflet-draw-draw-circle::before { content: '\f111'; }
.geojson-tool-window .leaflet-draw-draw-marker::before { content: '\f3c5'; }
.geojson-tool-window .leaflet-draw-edit-edit::before { content: '\f044'; }
.geojson-tool-window .leaflet-draw-edit-remove::before { content: '\f2ed'; }
.geojson-tool-window .leaflet-draw-toolbar a:hover { background: var(--zee-brand-50); color: var(--zee-brand-800); }
.geojson-tool-window .leaflet-draw-toolbar a.leaflet-disabled { opacity: 0.4; background: var(--zee-surface); color: var(--zee-text-muted); }
/* Ferramenta ativa = pressionada, igual ao botão de legenda. */
.geojson-tool-window .leaflet-draw-toolbar a.leaflet-draw-toolbar-button-enabled {
  background: var(--zee-bg);
  color: var(--zee-text);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18), inset 0 0 0 1px var(--zee-border-strong);
}
.geojson-tool-window .leaflet-draw-toolbar a.leaflet-draw-toolbar-button-enabled::before { transform: translateY(1px); }

.zee-nav-control { display: flex; flex-direction: column; }

/* ── Controles inferiores: escala, coordenadas ────────────────────────────── */
.zee-layout .leaflet-bottom.leaflet-left { display: flex; align-items: flex-end; gap: 6px; }
.zee-layout .leaflet-bottom.leaflet-left .leaflet-control { clear: none; margin-left: 0; }
.zee-layout .leaflet-bottom.leaflet-left .leaflet-control:first-child { margin-left: 10px; }

/* Coordenadas (chip escuro) empilhadas sobre a escala em linha simples. */
.zee-coord-scale {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin: 0 10px 6px 0 !important; /* mesmo recuo do texto de versão */
}

.zee-coord {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  background: rgba(70, 80, 82, 0.85);
  color: #fff;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.zee-coord:hover { background: rgba(50, 60, 62, 0.92); }

/* Editor de coordenadas: abre acima da pilha. */
.zee-coord.is-editing {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  display: block;
  width: 288px;
  padding: 6px 8px;
  background: var(--zee-surface);
  color: var(--zee-text);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  box-shadow: var(--zee-shadow);
  cursor: default;
  white-space: normal;
}

.zee-coord-scale .leaflet-control-better-scale {
  display: flex;
  flex-direction: column-reverse;
  margin: 0 !important;
  padding: 0;
  height: auto;
  background: transparent;
  box-shadow: none;
}
.zee-coord-scale .leaflet-control-better-scale-ruler {
  height: 5px;
  background: transparent;
  border: 1px solid #333;
  border-top: 0;
}
.zee-coord-scale .leaflet-control-better-scale-ruler-block,
.zee-coord-scale .leaflet-control-better-scale-label:not(.leaflet-control-better-scale-second-number) { display: none; }
.zee-coord-scale .leaflet-control-better-scale-label-div { height: 13px; }
.zee-coord-scale .leaflet-control-better-scale-second-number {
  left: auto;
  right: -4px;
  top: 0;
  width: auto;
  height: auto;
  color: #333;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff;
  font-family: 'Open Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
}

.zee-version-tag {
  background: transparent !important;
  color: var(--zee-text-muted) !important;
}

/* ── Callout de clique (mobile / sem cartão) ──────────────────────────────── */
.zeer-click-callout {
  background: var(--zee-surface);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  box-shadow: var(--zee-shadow);
  color: var(--zee-text);
}
.zeer-click-callout-circle { border-color: var(--zee-brand-900); background: var(--zee-selection); box-shadow: 0 0 0 3px var(--zee-surface-glass); }
.zeer-click-callout-line { background: var(--zee-brand-900); }

/* Pontos encontrados pela busca por texto (layer-text-search.js): só um círculo; o selecionado
   vira o ponto de seleção normal (.zeer-click-callout-circle). O desenho fica no <span> interno
   porque o Leaflet usa o transform do próprio marcador para posicioná-lo. */
.zee-search-pin { cursor: pointer; }
.zee-search-pin > span {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 50%;
  border: 2px solid var(--zee-brand-900);
  background: transparent;
  transform: scale(0.67);
  transition: transform 120ms ease;
}
.zee-search-pin:hover > span { transform: scale(0.85); }
.zee-search-pin.is-active > span {
  background: var(--zee-selection);
  box-shadow: 0 0 0 3px var(--zee-surface-glass);
  transform: none;
}

/* Pergunta "manter a camada anterior?" da busca (layer-swap-prompt.js) — base em .ln-dialog. */
.zee-swap-dialog {
  width: min(300px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border-radius: var(--zee-radius);
}
.zee-swap-dialog .am-close { top: 8px; right: 8px; width: 24px; height: 24px; font-size: 13px; }
.zee-swap-dialog .ln-title { font-size: 14px; text-align: left; margin: 0 24px 4px 0; }
.zee-swap-dialog .ln-subtitle { font-size: 12px; text-align: left; line-height: 1.45; margin: 0 0 12px; }
.zee-swap-actions { display: flex; gap: 6px; }
.zee-swap-actions .ln-btn { flex: 1 1 0; padding: 7px 10px; font-size: 12px; }
.ln-btn.zee-swap-btn--ghost {
  background: transparent;
  color: var(--zee-text);
  box-shadow: inset 0 0 0 1px var(--zee-border);
}
.ln-btn.zee-swap-btn--ghost:hover { background: var(--zee-accent-soft); }

/* ── Cartões à direita ────────────────────────────────────────────────────── */
.zee-cards {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  width: var(--zee-cards-w);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  overflow: clip; /* scrollIntoView da legenda não rola a coluna */
  z-index: 1001;
  pointer-events: none;
}

/* Cartões encolhem e rolam por dentro; Localização mantém altura fixa. */
.zee-card {
  pointer-events: auto;
  flex: 0 1 auto;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  background: var(--zee-surface);
  border-radius: var(--zee-radius);
  box-shadow: var(--zee-shadow-sm);
  overflow: hidden;
}

.zee-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--zee-border);
}
.zee-card.is-collapsed .zee-card-header { border-bottom: 0; }
.zee-card-title { font-size: 13px; font-weight: 600; color: var(--zee-text); }
.zee-card-toggle {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: var(--zee-radius-xs);
  background: transparent;
  color: var(--zee-text-muted);
  cursor: pointer;
  font-size: 11px;
}
.zee-card-toggle:hover { background: var(--zee-brand-50); }

.zee-card-header { flex: none; }
.zee-card-body { flex: 1 1 auto; min-height: 0; padding: 10px 12px 12px; overflow-y: auto; scrollbar-width: thin; }
.zee-card-location { flex: none; }
.zee-card.is-collapsed .zee-card-body { display: none; }
.zee-card.is-hidden { display: none; }
.zee-card-info { flex-shrink: 0; max-height: 50%; }
.zee-card-legend .zee-card-body { padding: 8px 10px; }

.zee-card-empty { font-size: 12px; color: var(--zee-text-muted); line-height: 1.5; }
.zee-card-empty i { color: var(--zee-brand-700); margin-right: 4px; }

.zee-info-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.zee-info-head > i { font-size: 18px; color: var(--zee-brand-900); margin-top: 2px; }
.zee-info-head > div { flex: 1 1 auto; min-width: 0; }
.zee-info-head strong { display: block; font-size: 13.5px; font-weight: 600; }
.zee-info-head small { display: block; font-size: 11px; color: var(--zee-text-muted); }
.zee-info-clear {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: var(--zee-radius-xs);
  background: transparent;
  color: var(--zee-text-muted);
  cursor: pointer;
}
.zee-info-clear:hover { background: var(--zee-brand-50); color: var(--zee-text); }

.zee-info-tabs {
  display: flex;
  gap: 2px;
  margin: 0 -4px 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--zee-border);
  scrollbar-width: none;
}
.zee-info-tab {
  flex: none;
  padding: 5px 6px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--zee-text-muted);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.zee-info-tab span {
  display: inline-block;
  min-width: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: var(--zee-brand-100);
  color: var(--zee-brand-900);
  font-size: 9.5px;
  text-align: center;
}
.zee-info-tab.is-empty { color: var(--zee-text-faint); }
.zee-info-tab.is-active { color: var(--zee-brand-800); border-bottom-color: var(--zee-brand-800); }

.zee-info-list { display: flex; flex-direction: column; }
.zee-info-row {
  display: grid;
  grid-template-columns: minmax(96px, 42%) 1fr;
  gap: 8px;
  padding: 4px 0;
  font-size: 11.5px;
  border-bottom: 1px dashed var(--zee-border);
}
.zee-info-row:last-child { border-bottom: 0; }
.zee-info-row dt { color: var(--zee-text-muted); }
.zee-info-row dd { color: var(--zee-text); word-break: break-word; }
.zee-info-source { margin-top: 6px; font-size: 10px; color: var(--zee-text-faint); }

/* Legenda ancorada (legend-floating-window.js → dockInto) */
.legend-floating-window.legend-docked {
  position: static !important;
  float: none;
  width: auto !important;
  min-width: 0;
  max-width: none;
  transform: none !important;
  opacity: 1 !important;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
  overflow: visible;
}
.legend-docked .legend-floating-window-header,
.legend-docked .floating-resize-handle { display: none; }
.legend-docked .legend-floating-window-content {
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible;
  padding: 0;
}
.legend-docked .legend-floating-window-item {
  background: var(--zee-brand-50);
  border: 1px solid var(--zee-border);
  border-radius: var(--zee-radius-sm);
  padding: 6px;
}
.legend-docked .legend-floating-window-item-grid { grid-template-columns: 1fr; gap: 6px; }
.legend-docked .legend-floating-window-description-column {
  border-left: 0;
  border-top: 1px solid var(--zee-border);
  padding: 6px 0 0;
}
.legend-docked .legend-floating-window-item-image { max-width: 100%; }
.legend-docked .legend-floating-window-item-title,
.legend-docked .legend-floating-window-description-value,
.legend-docked .legend-floating-window-empty { color: var(--zee-text); }
.legend-docked .legend-floating-window-column-title { color: var(--zee-text-muted); }
.legend-docked .legend-floating-window-description-line + .legend-floating-window-description-line { border-top-color: var(--zee-border); }

/* Mapa de localização */
.zee-card-location .zee-card-body { display: flex; justify-content: center; padding: 8px 12px; }
.zee-locmap { width: 100%; max-width: 140px; max-height: 124px; cursor: crosshair; }
.zee-locmap-mun { fill: var(--zee-accent-muted); stroke: var(--zee-surface); stroke-width: 0.8; }
.zee-locmap-mun:hover { fill: var(--zee-brand-200); }
.zee-locmap-view { fill: var(--zee-selection); stroke: var(--zee-brand-900); stroke-width: 1.4; pointer-events: none; }

/* ── Responsivo ───────────────────────────────────────────────────────────── */
@media (max-width: 1360px) {
  :root { --zee-side-w: 232px; --zee-cards-w: 270px; }
  .zee-brand-sub { display: none; }
  .zee-search { --zee-search-room: calc(50% - 110px); }
}

@media (max-width: 1100px) {
  .zee-tab span { display: none; }
  .zee-tab { min-width: 38px; height: 36px; }
  .wrapper .header .auth-btn { min-width: 40px; height: 38px; }
  .zee-auth-label { display: none; }
}

@media (max-height: 820px) {
  .geojson-tool-window-content { zoom: 0.72; }
}

@media (max-width: 900px) {
  :root { --zee-side-w: 220px; }
  /* Cartões viram painel inferior */
  .zee-cards {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 34px;
    width: auto;
    height: auto;
    max-height: 46%;
  }
  .zee-card-location,
  .geojson-tool-window .zee-card-btn-localizacao { display: none; }
}

@media (max-width: 640px) {
  :root { --zee-header-h: 96px; --zee-map-gap: 0px; }

  .wrapper .header {
    --zee-header-veil: color-mix(in srgb, var(--zee-surface) 45%, transparent);
    background-position: 0 0, 35% center, 0 0;
  }

  .wrapper .header .header-menu {
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 10px;
    padding: 8px 10px;
  }
  .zee-drawer-btn { display: block; }
  .zee-brand img { height: 32px; }
  .zee-tabs { margin-left: auto; padding: 2px; box-shadow: none; }
  .zee-tab { min-width: 34px; height: 34px; padding: 0 4px; }
  .zee-tab i { font-size: 14px; }
  .wrapper .header .auth-btn { min-width: 36px; height: 36px; }
  .zee-search { position: relative; top: auto; right: auto; transform: none; order: 10; height: 34px; margin-left: auto; }
  .zee-search.is-open, .zee-search.is-filled { flex: 1 1 100%; width: auto; max-width: none; }

  .wrapper .zee-layout #map { border-radius: 0; box-shadow: none; }

  /* Menu lateral vira gaveta */
  .zee-sidebar {
    position: fixed;
    top: var(--zee-header-h);
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    flex: none;
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: var(--zee-shadow);
  }
  .zee-drawer-open .zee-sidebar { transform: translateX(0); }
  .zee-side-collapse { display: none; }
  .zee-sidebar-collapsed .zee-sidebar { width: min(86vw, 320px); cursor: auto; }
  .zee-sidebar-collapsed .zee-side-item span,
  .zee-sidebar-collapsed .zee-btn-primary span { display: inline; }
  .zee-sidebar-collapsed .zee-side-body { visibility: visible; }

  /* Identificação usa o callout flutuante; cartão de informações sai. */
  .zee-card-info,
  .geojson-tool-window .zee-card-btn-info { display: none; }
  .zee-cards { left: 62px; bottom: 44px; max-height: 40%; }
  .zeer-click-callout { z-index: 1250; }
  .geojson-tool-window-content { zoom: 0.66; }
}
