/* ===========================
   RESET & ROOT VARIABLES
=========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Paleta baseada no Urbano Dados: Fundo Claro + Azul + Cinza/Preto */
:root {
  --bg-deep: #f5f5f0;
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf8;
  --bg-panel: #ffffff;

  --border: rgba(78, 109, 80, 0.12);
  --border-light: rgba(78, 109, 80, 0.22);
  --border-solid: rgba(78, 109, 80, 0.35);

  --text-primary: #1c271d;
  --text-secondary: #425244;
  --text-muted: #6b7d6e;

  /* Verde SÃ¡lvia / Floresta (#4E6D50) */
  --accent: #4E6D50;
  --accent-light: #638A66;
  --accent-pale: rgba(78, 109, 80, 0.12);
  --dash-sage-dark: #2E5A36;

  /* Deep Forest secundÃ¡rio */
  --navy: #2e3b23;
  --navy-light: #3f5130;

  /* Cores de status */
  --green: #2e8b57;
  --green-light: #3aab6a;
  --green-bg: rgba(46, 139, 87, 0.14);

  --amber: #c9840a;
  --amber-bg: rgba(201, 132, 10, 0.14);

  --red: #b94040;
  --red-bg: rgba(185, 64, 64, 0.14);

  /* Raios (todos 0 para visual limpo) */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;

  /* Sombras */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 3px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.12);

  --header-h: 64px;
  --menu-bar-h: 36px;
  --sidebar-w: 360px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s ease;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   HEADER  â€” estilo clÃ¡ssico
=========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.85);
  /* Tom mais claro e translÃºcido */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  /* Sombra mais sutil */
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* TÃ­tulo em estilo clÃ¡ssico â€” sem gradiente neon */
.header-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.header-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* NavegaÃ§Ã£o do Header */
.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-search .search-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-deep);
  box-shadow: none;
  border-color: var(--border-light);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 40px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.login-btn:hover {
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(74, 128, 180, 0.3);
  transform: translateY(-1px);
}

.login-btn svg {
  color: white;
}


.ctrl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-solid);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Inter', sans-serif;
}

.ctrl-btn:hover {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* ===========================
   BARRA 2D DE FERRAMENTAS
=========================== */
.toolbar-2d {
  /* ComeÃ§a escondida â€” exibida via .toolbar-2d--visible quando muda para 2D */
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: rgba(37, 67, 39, 0.92);
  /* Tom de #254327 */
  border: 1px solid rgba(78, 109, 80, 0.35);
  /* Transparente de --accent */
  border-radius: 00px;
  padding: 8px 18px 8px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(78, 109, 80, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toolbar-2d--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ESTADOS DA BARRA (COMPACTO / OCULTO) */
/* Estado Compacto (Apenas Ãcones) */
.toolbar-2d[data-state="icons"] {
  gap: 6px;
  padding: 6px 12px;
  border-radius: 0px;
}

.toolbar-2d[data-state="icons"] .toolbar-2d-sep {
  display: none !important;
}

.toolbar-2d[data-state="icons"] .tool-btn {
  padding: 8px !important;
  border-radius: 0px !important;
  min-width: 36px !important;
  height: 36px !important;
  justify-content: center !important;
  gap: 0 !important;
}

.toolbar-2d[data-state="icons"] .tool-btn span,
.toolbar-2d[data-state="icons"] .tool-btn .desktop-text,
.toolbar-2d[data-state="icons"] .tool-btn .mobile-text {
  display: none !important;
}

/* Estado Oculto (Minimizado Tudo) */
.toolbar-2d[data-state="hidden"] {
  transform: translateX(-50%) translateY(100px) scale(0.95) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* BotÃ£o Flutuante para Restaurar a Barra (FAB) */
#btnToolbarExpand {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.8);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 0%;
  background: rgba(37, 67, 39, 0.92);
  /* Tom de #254327 */
  border: 1px solid rgba(78, 109, 80, 0.45);
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(78, 109, 80, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#btnToolbarExpand.fab-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

#btnToolbarExpand:hover {
  background: rgba(37, 67, 39, 0.98);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 24px rgba(78, 109, 80, 0.45);
  transform: translateX(-50%) translateY(-2px) scale(1.05);
}

#btnToolbarExpand:active {
  transform: translateX(-50%) translateY(0) scale(0.95);
}

/* MODAL DE TABELA DE DADOS - ESTRUTURA E LAYOUTS */
.layer-table-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 18, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease, backdrop-filter 0.25s ease;
  pointer-events: auto;
}

.layer-table-modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-solid);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    top 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    bottom 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    left 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    right 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
    border-radius 0.3s ease,
    box-shadow 0.3s ease,
    background 0.2s ease;
  font-family: 'Inter', sans-serif;

  /* Layout Completo (PadrÃ£o) */
  width: 92%;
  max-width: 1100px;
  height: 80%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
}

/* LAYOUT: DOCKED (FOCAR LATERAL) */
.layer-table-modal[data-layout="docked"] {
  background: rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
  /* Clicar no mapa atrÃ¡s! */
}

.layer-table-modal[data-layout="docked"] .layer-table-modal-content {
  pointer-events: auto !important;
  /* Reativar ponteiro para o modal */
  width: 390px !important;
  height: 88% !important;
  top: 6% !important;
  right: 20px !important;
  left: auto !important;
  bottom: auto !important;
  transform: translate(0, 0) scale(1) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(78, 109, 80, 0.2) !important;
}

/* LAYOUT: MINIMIZED (BARRA FLUTUANTE) */
.layer-table-modal[data-layout="minimized"] {
  background: rgba(0, 0, 0, 0.0) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none !important;
}

.layer-table-modal[data-layout="minimized"] .layer-table-modal-content {
  pointer-events: auto !important;
  width: 320px !important;
  height: 48px !important;
  bottom: 20px !important;
  right: 20px !important;
  top: auto !important;
  left: auto !important;
  transform: translate(0, 0) scale(1) !important;
  border-radius: 0px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--border-solid) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  cursor: pointer;
}

/* CustomizaÃ§Ãµes adicionais para o modo minimizado (barra flutuante) */
.layer-table-modal[data-layout="minimized"] .table-container,
.layer-table-modal[data-layout="minimized"] div[style*="border-top"] {
  display: none !important;
}

.layer-table-modal[data-layout="minimized"] .layer-table-modal-content>div:first-child {
  padding: 8px 16px !important;
  height: 48px !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.layer-table-modal[data-layout="minimized"] span[style*="font-size: 11px"],
.layer-table-modal[data-layout="minimized"] button[onclick*="export"] {
  display: none !important;
}

.layer-table-modal[data-layout="minimized"] h3 {
  font-size: 12.5px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 170px !important;
}



/* Em modo 3D: esconde os botÃµes exclusivos de 2D, mantÃ©m Estilo e OSM */
.toolbar-2d--3d .toolbar-2d-label {
  display: none;
}

.toolbar-2d-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  padding-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-2d-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-2d-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  border-radius: 0px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 0px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.tool-btn svg {
  flex-shrink: 0;
  transition: stroke 0.18s ease;
}

.tool-btn:hover {
  background: rgba(78, 109, 80, 0.18);
  /* Verde translÃºcido */
  border-color: rgba(78, 109, 80, 0.4);
  color: #fff;
}

.tool-btn.active-tool {
  background: rgba(78, 109, 80, 0.25);
  /* Verde translÃºcido ativo */
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(78, 109, 80, 0.25);
}

.tool-btn.tool-disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  filter: grayscale(1);
  pointer-events: auto !important;
  /* Permitir hover para o title */
}

.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease-out;
  z-index: 100;
}

.dropdown-menu.show,
.dropdown-wrapper:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  width: 100%;
  text-align: left;
}

.dropdown-item svg {
  color: inherit;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background: var(--accent-pale);
  color: var(--accent);
}

.dropdown-item.active-menu-item {
  background: var(--accent-pale);
  color: var(--accent);
  font-weight: 600;
}

/* â”€â”€ Menubar dropdown â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Shares same visual style, just opens downward from menubar */
.menubar-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border-solid);
  border-radius: 0px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.15s ease-out;
  z-index: 100;
}

.menubar-item:hover .menubar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===========================
   APP MENUBAR
=========================== */
.app-menubar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: var(--menu-bar-h);
  background: var(--accent);
  z-index: 99;
  border-bottom: 1px solid var(--navy-light);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.menubar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  gap: 4px;
}

.menubar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.menubar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.menubar-spacer {
  flex: 1;
}

/* BotÃ£o de aÃ§Ã£o (Exportar) */
.menubar-btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 14px;
  background: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menubar-btn-action:hover {
  background: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* BotÃ£o de aÃ§Ã£o em destaque (Estudo de Massas) */
.menubar-btn-action-blue {
  --proposal-blue: #1B3D8F;
  background: var(--proposal-blue);
  color: #ffffff;
}

.menubar-btn-action-blue:hover {
  background: #142c6b;
  color: #ffffff;
}

/* â”€â”€ Menubar items â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Submenu (ex: Tipo de Mapa) */
.dropdown-submenu-wrapper {
  position: relative;
}

.dropdown-submenu-wrapper .submenu-arrow {
  margin-left: auto;
  opacity: 0.5;
  flex-shrink: 0;
}

.menubar-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 150px;
  background: #fff;
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: all 0.15s ease-out;
  z-index: 101;
}

.dropdown-submenu-wrapper:hover>.menubar-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.map-type-check {
  display: inline-block;
  width: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.main-layout {
  position: fixed;
  top: calc(var(--header-h) + var(--menu-bar-h));
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
}

/* ===========================
   MAPA
=========================== */
.map-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

/* Controles nativos do MapLibre */
.maplibregl-ctrl-group {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-solid) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  background: transparent !important;
  color: var(--text-secondary) !important;
}

.maplibregl-ctrl-group button:hover {
  background: var(--accent-pale) !important;
  color: var(--accent-light) !important;
}

/* Barra de busca */
.map-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 10;
  pointer-events: none;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  z-index: 110;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: 0px;
  padding: 10px 16px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  pointer-events: all;
  transition: all var(--transition);
}

.search-box:focus-within {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(74, 128, 180, 0.15);
  transform: translateY(-1px);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-solid);
  border-radius: 0px;
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  display: none;
  animation: slideInUp 0.2s ease-out;
  padding: 8px;
}

.search-results.show {
  display: block;
}

.search-group-title {
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 0px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-item:hover {
  background: var(--bg-deep);
}

.search-item-icon {
  color: var(--accent);
  flex-shrink: 0;
}

.search-item-text {
  display: flex;
  flex-direction: column;
}

.search-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.search-item-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

/* Legenda */
.map-legend {
  position: absolute;
  bottom: 30px;
  left: 14px;
  z-index: 10;
  background: var(--bg-dark);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}

.legend-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 0px;
  /* quadrado clÃ¡ssico em vez de cÃ­rculo */
  flex-shrink: 0;
}

.legend-dot.disponivel {
  background: #2e8b57;
}

.legend-dot.reservado {
  background: #c9840a;
}

.legend-dot.vendido {
  background: #b94040;
}

/* EstilizaÃ§Ã£o para seletores de cor interativos nas legendas */
.legend-item input[type="color"],
#customLegendsContainer input[type="color"],
.map-legend input[type="color"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--border-solid);
  border-radius: 0px;
  background: none;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
}

.legend-item input[type="color"]::-webkit-color-swatch-wrapper,
#customLegendsContainer input[type="color"]::-webkit-color-swatch-wrapper,
.map-legend input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.legend-item input[type="color"]::-webkit-color-swatch,
#customLegendsContainer input[type="color"]::-webkit-color-swatch,
.map-legend input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 0px;
}






/* Controles de cÃ¢mera (pitch / bearing) */
.map-view-controls {
  position: absolute;
  right: 14px;
  top: 80px;
  /* Ajustado para nÃ£o colidir com o topo se houver outros elementos */
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}



.drag-handle {
  padding: 8px 10px 8px 6px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle:hover {
  color: var(--accent);
}





.toggle-tools-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
}

.toggle-tools-btn:hover {
  background: rgba(74, 128, 180, 0.1);
  color: var(--accent);
}




.ctrl-sep {
  width: 1px;
  height: 20px;
  background: var(--border-solid);
  margin: 0 4px;
}

.view-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-solid);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-ctrl-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-deep);
}

/* ===========================
   SIDEBAR â€” estilo clÃ¡ssico
=========================== */
/* BotÃ£o de toggle da sidebar â€” fixado na borda do painel */
.sidebar-toggle-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 140px;
  background: var(--accent);
  border: 1px solid var(--border-solid);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  transition: background 0.18s, color 0.18s, left 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 95;
  padding: 8px 0;
  box-shadow: var(--shadow-md);
}

.sidebar-right-toggle {
  right: var(--sidebar-w);
  border-right: none;
}

.sidebar-right-toggle.collapsed {
  right: 0;
}

.sidebar-left-toggle {
  left: var(--sidebar-w);
  border-left: none;
}

.sidebar-left-toggle.collapsed {
  left: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--accent-light);
  color: #ffffff;
}

.sidebar-toggle-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.sidebar-toggle-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  user-select: none;
}

/* Quando a sidebar estÃ¡ colapsada, gira a seta 180Â° */
.sidebar-right-toggle.collapsed svg {
  transform: rotate(180deg);
}

.sidebar-left-toggle.collapsed svg {
  transform: rotate(0deg);
}

.sidebar-left-toggle svg {
  transform: rotate(180deg);
}

.sidebar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-dark);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  z-index: 90;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  /* animaÃ§Ã£o de colapsar/expandir */
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.sidebar-right {
  right: 0;
  border-left: 1px solid var(--border-solid);
}

.sidebar-left {
  left: 0;
  border-right: 1px solid var(--border-solid);
}

/* Estado colapsado */
.sidebar.sidebar--collapsed {
  width: 0;
  opacity: 0;
  pointer-events: none;
  border-left-width: 0;
  border-right-width: 0;
  box-shadow: none;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 0px;
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-panel);
  flex-shrink: 0;
}

.sidebar-header-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-pale);
  border: 1px solid var(--border-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-light);
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.sidebar-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}


.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 8px;
}



/* Detalhes do lote */
.lot-details {
  flex: 1;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Barra de status */
.lot-status-bar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}





.lot-id {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Foto do lote */
.lot-photo {
  height: 150px;
  position: relative;
  overflow: hidden;
}

.lot-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 16px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.3px;
}





/* Grade de informaÃ§Ãµes */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 16px 14px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 10px;
  text-align: center;
  transition: border-color var(--transition);
}

.info-card:hover {
  border-color: var(--border-solid);
  background: var(--bg-card-hover);
}

.info-icon {
  font-size: 18px;
  margin-bottom: 5px;
}

.info-label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* SeÃ§Ãµes de detalhes */
.detail-section {
  margin: 0 16px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-section-title {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: rgba(184, 146, 74, 0.06);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.detail-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: right;
}

/* Tags de infraestrutura */
.infra-tags {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.infra-tag {
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-pale);
  color: var(--accent-light);
  border: 1px solid var(--border-solid);
}


.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg-deep);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.btn-primary:active {
  opacity: 0.9;
}

.btn-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-solid);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-pale);
}

/* ===========================
   TOAST (NotificaÃ§Ãµes)
=========================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  pointer-events: none;

  background: rgba(20, 30, 20, 0.9);
  /* Verde escuro floresta */
  border: 1.5px solid var(--accent);
  /* Borda oliva */
  border-radius: 0px;
  /* Estilo pÃ­lula */
  padding: 10px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);

  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #e8f0dc;
  /* Creme esverdeado claro */
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 10000;

  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===========================
   RESPONSIVO
=========================== */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 100%;
  }

  .header-nav {
    display: none;
  }

  .main-layout {
    flex-direction: column-reverse;
    top: 0 !important;
  }

  .sidebar {
    height: 42vh;
    border-left: none;
    border-top: 1px solid var(--border-solid);
  }

}





/* Badge de viabilidade â€” dentro do tÃ­tulo da seÃ§Ã£o */
.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}





/* ===========================
   SUN PANEL (InsolaÃ§Ã£o)
=========================== */
.sun-panel {
  position: absolute;
  top: 70px;
  left: 16px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.sun-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  border-bottom: 1px solid var(--border);
  cursor: move;
  user-select: none;
}

.sun-panel-header h4 {
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 0.3px;
  color: white;
  margin: 0;
}

.sun-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.sun-close:hover {
  color: rgba(255, 255, 255, 0.8);
}

.sun-panel-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sun-control label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sun-control label span {
  float: right;
  font-weight: 600;
  color: var(--accent-light);
}

.sun-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* â”€â”€ Legenda: Uso das EdificaÃ§Ãµes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.use-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  font-size: 11px;
  color: #333;
  line-height: 1.3;
}

.use-legend-item span {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 0px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.10);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LEGENDA: GABARITO (altura das edificaÃ§Ãµes)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.gabarito-legend {
  display: none;
  position: absolute;
  bottom: 48px;
  left: 12px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(74, 128, 180, 0.3);
  border-radius: 0px;
  padding: 12px 14px 10px;
  font-size: 11.5px;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
  z-index: 10;
  min-width: 200px;
  max-width: 220px;
  animation: fadeIn 0.2s ease;
}

.gab-legend-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: #1e2d40;
  font-size: 12px;
}

.gab-legend-header svg {
  color: var(--accent);
  flex-shrink: 0;
}

.gab-gradient-bar {
  height: 14px;
  border-radius: 0px;
  background: linear-gradient(to right,
      #3b82f6,
      #06b6d4,
      #10b981,
      #84cc16,
      #eab308,
      #f97316,
      #ef4444,
      #9333ea,
      #1e1b4b);
  margin-bottom: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.gab-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #666;
  margin-bottom: 10px;
}


.gab-refs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gab-ref-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #333;
}

.gab-ref-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 0px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.10);
}


/* â”€â”€ BotÃ£o ativo (ferramentas de anÃ¡lise 2D) â”€â”€ */
.ctrl-btn.active-tool {
  background: rgba(79, 70, 229, 0.18);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   POPUP: Gabarito hover
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.gabarito-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 0px;
  border: 1px solid rgba(74, 128, 180, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.98);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

.gabarito-popup .mapboxgl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.98);
}

.gab-popup-inner {
  padding: 8px 12px;
  font-size: 12px;
  color: #1e2d40;
  min-width: 110px;
}

.gab-popup-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.gab-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 0px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.gab-popup-sub {
  font-size: 10.5px;
  color: #666;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PAINEL: INFRAESTRUTURA VIÃRIA
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.transporte-panel {
  display: none;
  /* mostrado via JS */
  position: absolute;
  bottom: 48px;
  right: 60px;
  /* lado direito, acima dos controles de cÃ¢mera */
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(74, 128, 180, 0.3);
  border-radius: 0px;
  padding: 0;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10;
  min-width: 220px;
  max-width: 260px;
  animation: fadeIn 0.2s ease;
  overflow: hidden;
}

/* â”€â”€ CabeÃ§alho do painel â”€â”€ */
.tp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent);
  color: white;
  cursor: move;
  user-select: none;
}

.tp-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 0.3px;
  color: white;
}

.tp-panel-title svg {
  color: white;
  flex-shrink: 0;
}

.tp-panel-actions {
  display: flex;
  gap: 3px;
}

.tp-toggle-all {
  width: 22px;
  height: 22px;
  border-radius: 0px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}

.tp-toggle-all:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* â”€â”€ Lista de categorias â”€â”€ */
.tp-cat-list {
  padding: 6px 0;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 128, 180, 0.3) transparent;
}

.tp-cat-list::-webkit-scrollbar {
  width: 3px;
}

.tp-cat-list::-webkit-scrollbar-thumb {
  background: rgba(74, 128, 180, 0.3);
  border-radius: 0px;
}

.tp-cat-row {
  padding: 0 12px;
}

.tp-cat-label-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 11.5px;
  color: #2d3748;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.12s;
}

.tp-cat-label-wrap:hover {
  color: var(--accent-light);
}

.tp-cat-label-wrap input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--accent);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.tp-cat-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  /* cÃ­rculo â€” igual ao layer do mapa */
  flex-shrink: 0;
  border: 1.5px solid;
}

.tp-cat-emoji {
  font-size: 13px;
  flex-shrink: 0;
}

.tp-cat-text {
  font-size: 11px;
  line-height: 1.3;
  flex: 1;
}

/* â”€â”€ RodapÃ© do painel â”€â”€ */
.tp-panel-note {
  padding: 6px 12px 8px;
  font-size: 9px;
  color: #999;
  border-top: 1px solid rgba(74, 128, 180, 0.12);
  line-height: 1.4;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   POPUP: Transporte hover
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.transporte-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 0px;
  border: 1px solid rgba(74, 128, 180, 0.2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.13);
  background: rgba(255, 255, 255, 0.98);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  min-width: 140px;
}

.transporte-popup .mapboxgl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.98);
}

.tp-popup-inner {
  display: flex;
  flex-direction: column;
}

.tp-popup-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px 5px;
  background: rgba(74, 128, 180, 0.06);
  border-bottom: 1px solid rgba(74, 128, 180, 0.10);
}

.tp-emoji {
  font-size: 15px;
  flex-shrink: 0;
}

.tp-cat-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #444;
}

.tp-popup-name {
  padding: 5px 11px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1e2d40;
  line-height: 1.35;
}

.tp-popup-details {
  padding: 3px 11px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tp-detail-row {
  font-size: 10.5px;
  color: #555;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PAINEL: ESTILO DO MAPA (editor de cores)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.estilo-panel {
  display: none;
  position: fixed;
  top: 110px;
  /* Alinhado abaixo do menubar fixo */
  right: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 260px;
  max-width: 300px;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* â”€â”€ CabeÃ§alho â”€â”€ */
.ep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent);
  color: white;
  cursor: move;
  user-select: none;
}

.ep-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 0.3px;
  color: white;
}

.ep-title svg {
  color: white;
  flex-shrink: 0;
}

.ep-reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 0px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 10.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.ep-reset-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* â”€â”€ SeÃ§Ãµes e rows de cor â”€â”€ */
.ep-controls {
  padding: 6px 0 8px;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 128, 180, 0.25) transparent;
}

.ep-controls::-webkit-scrollbar {
  width: 3px;
}

.ep-controls::-webkit-scrollbar-thumb {
  background: rgba(74, 128, 180, 0.3);
  border-radius: 3px;
}

.ep-section-title {
  padding: 7px 12px 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent, #4a80b4);
  border-top: 1px solid rgba(74, 128, 180, 0.08);
}

.ep-section-title:first-child {
  border-top: none;
}

.ep-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px dashed var(--border);
  transition: background 0.12s;
}

.ep-row:last-child {
  border-bottom: none;
}

.ep-row:hover {
  background: rgba(74, 128, 180, 0.04);
}

.ep-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: #777;
}

.ep-label {
  flex: 1;
  font-size: 11.5px;
  color: #2d3748;
  line-height: 1.3;
}

/* â”€â”€ Swatch + color input â”€â”€ */
.ep-swatch-wrap {
  position: relative;
  width: 52px;
  height: 22px;
  border-radius: 0px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 0.15s, transform 0.1s;
}

.ep-swatch-wrap:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transform: scaleX(1.05);
}

/* --- MOBILE BOTTOM SHEET --- */
@media (max-width: 768px) {
  .estilo-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    min-width: 100%;
    border-radius: 0px;
    border: none;
    border-top: 1px solid var(--border-solid);
    transform: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .estilo-panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--border-solid);
    border-radius: 0px;
    z-index: 10;
  }

  .ep-header {
    padding-top: 24px;
    background: var(--accent);
    border-radius: 0px;
  }

  .ep-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
    max-height: 60vh;
  }

  .ep-section-title {
    grid-column: span 2;
    margin-top: 10px;
    font-size: 11px;
    border-top: none;
    border-bottom: 1px solid var(--border-light);
    padding: 0 0 4px 0;
  }

  .ep-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-deep);
    border-radius: 0px;
    padding: 15px 10px;
    border: 1px solid var(--border-light);
    gap: 8px;
  }

  .ep-swatch-wrap {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
  }

  .ep-label {
    font-size: 11px;
    font-weight: 500;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PAINEL: DESENHO (draw.js)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.draw-panel {
  display: none;
  position: fixed;
  top: 60px;
  right: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  min-width: 220px;
  max-width: 260px;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.draw-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent);
  color: white;
  cursor: move;
  user-select: none;
}

.draw-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 0.3px;
  color: white;
}

.draw-panel-title svg {
  color: white;
  flex-shrink: 0;
}

.draw-panel-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.draw-panel-actions {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}

.draw-btn-export {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.draw-btn-export:hover {
  background: var(--accent-light, #6a8a3e);
  border-color: var(--accent-light, #6a8a3e);
}

.draw-btn-export svg {
  flex-shrink: 0;
}

/* â”€â”€ Linhas de configuraÃ§Ã£o do estilo â”€â”€ */
.drw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dashed var(--border);
  transition: background 0.12s;
}

.drw-row:last-child {
  border-bottom: none;
}

.drw-row:hover {
  background: rgba(74, 128, 180, 0.04);
}

.drw-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.drw-label {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #2d3748;
}

.drw-value {
  font-size: 11px;
  color: #666;
  min-width: 32px;
  text-align: right;
}

.drw-section-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 4px 3px;
  border-top: 1px solid rgba(74, 128, 180, 0.08);
  margin-top: 4px;
}

.drw-section-title:first-child {
  border-top: none;
  margin-top: 0;
}

.drw-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 12px;
  font-style: italic;
}

/* â”€â”€ Dropdown separator â”€â”€ */
.dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.ep-color-input {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ep-swatch-preview {
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: filter 0.1s;
}

.ep-swatch-wrap:hover .ep-swatch-preview {
  filter: brightness(0.88);
}

/* â”€â”€ Range Slider Opacity (Estilo) â”€â”€ */
input[type=range].ep-opacity-slider {
  -webkit-appearance: none;
  background: transparent;
  width: 100%;
}

input[type=range].ep-opacity-slider:focus {
  outline: none;
}

input[type=range].ep-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -5px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type=range].ep-opacity-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-solid);
  border-radius: 0px;
}

input[type=range].ep-opacity-slider::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type=range].ep-opacity-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: var(--border-solid);
  border-radius: 0px;
}

/* â”€â”€ Map Loading Overlay â”€â”€ */
.map-loading-overlay {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.map-loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.map-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 290px;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-primary, #1e293b);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.1px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(78, 109, 80, 0.2);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(78, 109, 80, 0.05);
  pointer-events: auto;
}

.map-loading-text {
  color: var(--text-primary, #1e293b);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

#mapLoadingPctBadge {
  font-size: 10.5px;
  font-weight: 700;
  background: var(--accent-pale, rgba(78, 109, 80, 0.12));
  color: var(--accent, #4E6D50);
  border: 1px solid rgba(78, 109, 80, 0.2);
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.2;
}

.map-loading-cancel-btn {
  pointer-events: auto;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #ef4444;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  flex-shrink: 0;
}

.map-loading-cancel-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.map-loading-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(78, 109, 80, 0.2);
  border-top-color: var(--accent, #4E6D50);
  border-radius: 50%;
  animation: spin 0.65s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
  flex-shrink: 0;
}

#mapLoadingProgressBar {
  background: linear-gradient(90deg, #4E6D50 0%, #688f6a 50%, #4E6D50 100%);
  background-size: 200% 100%;
  animation: progressPulse 2s infinite ease-in-out;
}

@keyframes progressPulse {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE OPTIMIZATIONS (@media)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --sidebar-w: 100%;
  }

  .header {
    padding: 0 16px;
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    pointer-events: none;
    /* Cliques passam para o mapa */
  }

  .header-brand,
  .header-right {
    pointer-events: auto;
    /* Logo e botÃ£o de login clicÃ¡veis */
  }

  /* Simplifica o Header: MantÃ©m apenas o logo e o botÃ£o de login */
  .header-sub,
  .header-nav,
  .header-title-container {
    display: none !important;
  }

  /* Estiliza o logo como um botÃ£o circular flutuante */
  .header-logo-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    margin-top: 9px !important;
  }

  .header-logo-link .header-logo img {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
  }

  .header-search {
    position: absolute;
    top: 64px;
    left: 12px;
    width: 42px;
    height: 42px;
    z-index: 2000;
    transition: width 0.3s ease;
    pointer-events: auto;
  }

  .header-search:focus-within,
  .header-search.focused {
    width: calc(100vw - 24px);
  }

  .header-search .search-box-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .header-search .search-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-solid) !important;
    padding: 0;
    overflow: hidden;
    transition: width 0.3s ease;
  }

  .header-search .search-box:focus-within,
  .header-search.focused .search-box {
    width: 100%;
  }

  .header-search input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 16px 0 44px;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
  }

  .header-search .search-box:focus-within input,
  .header-search.focused .search-box input {
    opacity: 1;
    cursor: text;
  }

  .header-search svg {
    position: absolute;
    left: 12px;
    top: 12px;
    pointer-events: none;
  }

  /* Estiliza o botÃ£o de entrar como um botÃ£o circular flutuante com Ã­cone */
  .login-btn span {
    display: none;
  }

  .login-btn {
    pointer-events: auto !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-solid) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-primary) !important;
    margin-top: 9px !important;
    padding: 0 !important;
  }

  .login-btn svg {
    margin: 0 !important;
    color: var(--text-primary) !important;
  }

  /* Transformar Sidebar em um Bottom Sheet */
  .sidebar {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 75vh;
    transform: translateY(100%);
    /* Escondido por padrÃ£o */
    z-index: 3000;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: #fff;
    overflow-y: auto;
  }

  .sidebar:not(.sidebar--collapsed) {
    transform: translateY(0);
  }

  .sidebar-header {
    padding: 24px 20px 10px;
  }

  /* Adiciona um "degrau" visual de fechar o bottom sheet */
  .sidebar::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 10px;
  }

  .sidebar-toggle-btn {
    display: none !important;
    /* Escondido no mobile, usamos clique fora ou gesto */
  }


  .drag-handle {
    display: none !important;
    /* Sem arrastar no mobile, layout fixo */
  }

  /* Toolbar 2D na base (acima do bottom sheet quando fechado) */
  .toolbar-2d {
    bottom: 24px;
    width: calc(100% - 24px);
    border-radius: 16px;
    padding: 10px;
    gap: 8px;
    justify-content: center;
    box-sizing: border-box;
  }

  .toolbar-2d-tools {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  /* No celular, quando a barra estiver no modo icons, exibe os SVGs mesmo que tenham hide-on-mobile */
  .toolbar-2d[data-state="icons"] .tool-btn svg.hide-on-mobile {
    display: block !important;
  }

  /* Prevenir vazamento de submenus/dropdowns no celular */
  #zoneamentoDropdown,
  #lotesDropdown,
  #osmDropdown {
    left: 0 !important;
    transform: translateY(10px) !important;
  }

  .dropdown-wrapper:hover #zoneamentoDropdown,
  .dropdown-wrapper:hover #lotesDropdown,
  .dropdown-wrapper:hover #osmDropdown,
  #zoneamentoDropdown.show,
  #lotesDropdown.show,
  #osmDropdown.show {
    transform: translateY(0) !important;
  }

  #drawDropdown,
  #measureDropdown {
    left: auto !important;
    right: 0 !important;
    transform: translateY(10px) !important;
  }

  .dropdown-wrapper:hover #drawDropdown,
  .dropdown-wrapper:hover #measureDropdown,
  #drawDropdown.show,
  #measureDropdown.show {
    transform: translateY(0) !important;
  }

  .toolbar-2d-label {
    display: none;
    /* Sem espaÃ§o para texto "CAMADAS 2D" */
  }

  .tool-btn {
    padding: 10px;
    border-radius: 12px;
  }

  .tool-btn span {
    display: none;
    /* Apenas Ã­cones no mobile por padrÃ£o */
  }

  .desktop-text {
    display: none !important;
  }

  .mobile-text {
    display: inline !important;
    font-size: 11px;
    font-weight: 700;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .ctrl-btn span {
    display: none;
    /* Apenas Ã­cones no mobile */
  }

  .ctrl-btn {
    padding: 10px;
    border-radius: 10px;
  }

  .map-view-controls {
    right: 12px;
    top: 130px;
    /* Ajusta para baixo do floating controls */
  }

  /* PainÃ©is como modais compactos no mobile (ficam na frente e bem posicionados) */
  .sun-panel,
  .transporte-panel,
  .estilo-panel,
  .draw-panel,
  .floating-panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    bottom: 20px !important;
    top: auto !important;
    transform: none !important;
    border-radius: 20px !important;
    z-index: 4000 !important;
  }

  /* Ajuste no Modal de Boas Vindas */
  .modal-content {
    padding: 24px 20px;
    border-radius: 0px;
    margin: 0 12px;
  }

  .modal-title {
    font-size: 22px;
  }




  #searchResults {
    max-height: 50vh;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }

  .mobile-legend-btn {
    display: flex !important;
    background: var(--bg-card);
    border: 1px solid var(--border-solid);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    position: absolute;
    bottom: 150px;
    /* Ficou acima do botÃ£o de camadas (bottom: 100px) */
    left: 12px;
    z-index: 50;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  /* Menu de OpÃ§Ãµes do App (3 pontinhos) - Aproximado do botÃ£o de busca */
  .mobile-app-menu-btn {
    display: flex !important;
    position: absolute;
    top: 114px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid var(--border-solid);
    cursor: pointer;
  }

  /* BotÃ£o Gerenciador de Camadas isolado Ã  esquerda (agora no inferior esquerdo) */
  .mobile-layer-btn {
    display: flex !important;
    position: absolute;
    bottom: 100px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid var(--border-solid);
    cursor: pointer;
  }

  .app-menubar {
    display: flex !important;
    position: absolute;
    top: 114px !important;
    /* Mesma altura do botÃ£o de 3 pontos */
    left: 64px !important;
    /* Para a direita do botÃ£o de 3 pontos (que tem 42px) */
    right: auto !important;
    width: 200px !important;
    /* Limita a largura */
    height: auto !important;
    /* Permite que o fundo branco cresÃ§a e cubra os itens */
    transform: translateX(-10px) !important;
    background: #ffffff !important;
    /* Fundo branco e 100% opaco */
    padding: 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-solid) !important;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2000;
  }

  .app-menubar.open {
    opacity: 1 !important;
    /* ForÃ§a 100% opaco quando aberto */
    pointer-events: auto;
    transform: translateX(0) !important;
  }

  .app-menubar .menubar-inner {
    flex-direction: column !important;
    gap: 4px !important;
    width: 100%;
  }

  .app-menubar .menubar-btn {
    padding: 8px 10px;
    width: 100%;
    justify-content: space-between;
    color: var(--text-primary) !important;
    /* Corrige o texto invisÃ­vel */
    font-size: 12px !important;
  }

  .app-menubar .menubar-item {
    width: 100%;
  }

  /* Esconde o spacer e o botÃ£o de camadas do menubar no mobile, pois viraram botÃµes isolados */
  .app-menubar .menubar-spacer,
  .app-menubar #btnGerenciadorCamadas {
    display: none !important;
  }

  /* Oculta os submenus no mobile inicialmente */
  .app-menubar .menubar-dropdown,
  .app-menubar .menubar-submenu {
    position: relative;
    top: 0;
    left: 0;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 20px;
    padding-right: 0;
    display: none;
    /* Escondido por padrÃ£o no mobile */
    flex-direction: column;
    gap: 4px;
  }

  /* Mostra quando o pai tem a classe .expanded */
  .app-menubar .menubar-item.expanded>.menubar-dropdown,
  .app-menubar .dropdown-submenu-wrapper.expanded>.menubar-submenu {
    display: flex;
  }

  /* Gira a setinha se estiver expandido */
  .app-menubar .menubar-item.expanded>.menubar-btn svg,
  .app-menubar .dropdown-submenu-wrapper.expanded>svg.submenu-arrow {
    transform: rotate(180deg);
  }

  .app-menubar .menubar-submenu {
    padding-left: 20px;
  }

  .app-menubar .dropdown-item {
    font-size: 12px;
    padding: 6px 8px;
    color: var(--text-primary) !important;
    /* Corrige o texto invisÃ­vel */
  }

  .hide-legends-mobile .gabarito-legend,
  .hide-legends-mobile .use-legend,
  .hide-legends-mobile #setorLegend,
  .hide-legends-mobile #ibgeLegendLeft {
    display: none !important;
  }

  /* Posiciona os controles do mapa e o indicador de zoom acima do toolbar-2d no mobile */
  .mapboxgl-ctrl-bottom-right,
  .maplibregl-ctrl-bottom-right {
    bottom: 100px !important;
    right: 12px !important;
    left: auto !important;
  }

  #zoomIndicator {
    bottom: 80px !important;
    right: 12px !important;
    left: auto !important;
  }

  .mapboxgl-ctrl-bottom-left,
  .maplibregl-ctrl-bottom-left {
    bottom: 80px !important;
    left: 12px !important;
    right: auto !important;
  }
}

/* ===========================
   WELCOME MODAL
=========================== */
/* ===========================
   WELCOME MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 45, 15, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.4s ease-out;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 1050px;
  max-height: 92vh;
  margin: 10px;
  overflow-y: auto;
  border-radius: 0px;
  box-shadow: 0 25px 50px -12px rgba(30, 45, 15, 0.2);
  padding: 40px;
  text-align: center;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-pale) transparent;
}

.modal-content::-webkit-scrollbar {
  width: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--accent-pale);
  border-radius: 10px;
}

.modal-header {
  margin-bottom: 24px;
}

.modal-logo {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #1e2815;
  margin-bottom: 4px;
}

.modal-tagline {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent);
}

.modal-body {
  margin-bottom: 32px;
}

/* Custom intro message */
.modal-intro {
  color: var(--text-secondary) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  margin-bottom: 28px !important;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* 3-card onboarding grid */
.welcome-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
  text-align: left;
}

/* Base Card Styles */
.welcome-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 253, 250, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: 0;
  /* Borda reta */
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(78, 109, 80, 0.03);
  position: relative;
  overflow: hidden;
}

/* Card Hover effect */
.welcome-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(78, 109, 80, 0.08);
  border-color: var(--accent);
}

/* Card Icons */
.card-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 0;
  /* Borda reta nos Ã­cones para combinar */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.welcome-card:hover .card-icon-wrapper {
  transform: scale(1.1) rotate(2deg);
}

.card-svg-icon {
  width: 24px;
  height: 24px;
}

/* Individual card colors for subtle variation */
.card-novidades .card-icon-wrapper {
  background: rgba(46, 139, 87, 0.1);
  color: var(--green);
}

/* Card Guia - Cores Invertidas (Verde do site, texto branco) */
.card-guia {
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(78, 109, 80, 0.12);
}

.card-guia:hover {
  background: var(--accent-light);
  border-color: var(--bg-card);
}

.card-guia .card-title {
  color: #ffffff !important;
}

.card-guia .card-icon-wrapper {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.card-guia .card-list li {
  color: rgba(255, 255, 255, 0.85) !important;
}

.card-guia .card-list li strong {
  color: #ffffff !important;
}

.card-guia .card-list li::before {
  color: #ffffff !important;
}

.card-guia .card-list kbd {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.card-alerta .card-icon-wrapper {
  background: rgba(201, 132, 10, 0.1);
  color: var(--amber);
}

/* Card titles */
.welcome-card .card-title {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Version badge */
.card-version-badge {
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Card list / points */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-list li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  position: relative;
  padding-left: 18px;
}

/* Bullet icon replacements */
.card-list li::before {
  content: "â€¢";
  position: absolute;
  left: 4px;
  top: 0;
  font-weight: bold;
  font-size: 14px;
}

.card-novidades .card-list li::before {
  color: var(--green);
}

.card-guia .card-list li::before {
  color: var(--accent);
}

.card-alerta .card-list li::before {
  color: var(--amber);
}

.card-list li strong {
  color: var(--text-primary);
}

.card-list kbd {
  background: #fcfcf9;
  border: 1px solid var(--border-solid);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: monospace;
  box-shadow: var(--shadow-sm);
}

.modal-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.modal-btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 40px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  width: auto;
  min-width: 250px;
}

.modal-btn-primary:active {
  transform: scale(0.98);
}

.modal-btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(85, 107, 47, 0.2);
}

.modal-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.modal-link:hover {
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsiveness overrides for the 3-column grid */
@media (max-width: 960px) {
  .welcome-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-content {
    max-width: 600px;
    padding: 30px 20px;
  }
}

/* --- RESPONSIVIDADE DO MODAL --- */
@media (max-width: 600px) {
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    padding: 24px 16px;
    border-radius: 0px;
    margin: 8px;
  }

  .modal-header {
    margin-bottom: 20px;
  }

  .modal-logo img {
    width: 40px;
    height: 40px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-tagline {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .modal-body {
    margin-bottom: 20px;
    text-align: left;
  }

  .modal-body p {
    font-size: 13.5px;
    line-height: 1.4;
  }





  .modal-footer {
    gap: 10px;
  }

  .modal-btn-primary {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* --- Floating Panels (Draggable & Minimizable) --- */
.floating-panel {
  position: absolute;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 240px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.3s ease, opacity 0.2s ease;
}

.panel-header {
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  cursor: move;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.panel-title {
  font-size: 13px;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  letter-spacing: 0.3px;
}

.panel-actions {
  display: flex;
  gap: 4px;
}

.panel-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: background 0.2s;
}

.panel-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.panel-body {
  padding: 14px;
  max-height: 400px;
  overflow-y: auto;
}

.floating-panel.minimized {
  height: 42px !important;
  /* Altura do header apenas */
}

.floating-panel.minimized .panel-body {
  display: none;
}

/* --- Setores IBGE Specific --- */

#setoresBody {
  max-height: 520px;
  overflow-y: auto;
}
#setorLegend {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

#btnSetores.active {
  background: var(--accent-light);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(85, 107, 47, 0.4);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DIAGNÃ“STICO DE PROXIMIDADE
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Score Header â”€â”€ */
.prox-score-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(74, 128, 180, 0.03);
}

.prox-score-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid currentColor;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.prox-score-letter {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.prox-score-number {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
  line-height: 1;
}

.prox-score-info {
  flex: 1;
  min-width: 0;
}

.prox-score-label {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.prox-score-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* â”€â”€ Category Cards â”€â”€ */
.prox-category {
  border-bottom: 1px solid var(--border);
}

.prox-category:last-of-type {
  border-bottom: none;
}

.prox-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.prox-cat-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.prox-cat-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.prox-cat-label {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.prox-cat-count {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.prox-cat-score {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  text-align: right;
}

.prox-cat-chevron {
  transition: transform 0.25s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* â”€â”€ Expand / Collapse â”€â”€ */
.prox-cat-body {
  display: none;
  padding: 0 14px 10px;
}

.prox-category.expanded .prox-cat-body {
  display: block;
}

.prox-category.expanded .prox-cat-chevron {
  transform: rotate(180deg);
}

/* â”€â”€ POI Rows â”€â”€ */
.prox-poi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}

.prox-poi-row:hover {
  background: rgba(74, 128, 180, 0.06);
}

.prox-poi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prox-poi-info {
  flex: 1;
  min-width: 0;
}

.prox-poi-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prox-poi-type {
  font-size: 10px;
  color: var(--text-muted);
}

.prox-poi-dist {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.prox-empty {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 4px;
}

.prox-more {
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 4px;
  text-align: center;
  font-weight: 500;
}

.prox-more-toggle {
  cursor: pointer;
  transition: color 0.15s;
  border-radius: var(--radius-sm);
}

.prox-more-toggle:hover {
  color: var(--accent);
  background: rgba(74, 128, 180, 0.06);
}

.prox-more-open {
  color: var(--accent);
}

/* â”€â”€ Disclaimer â”€â”€ */
.prox-disclaimer {
  padding: 10px 14px;
  font-size: 9.5px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.015);
}

/* â”€â”€ Loading pulse animation â”€â”€ */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

/* â”€â”€ Mobile â”€â”€ */
@media (max-width: 768px) {
  #proxPanel {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    bottom: 90px !important;
    border-radius: 20px;
  }
}

/* ===========================
   MELHORIA NO BOTÃƒO DE FECHAR DO POPUP DO MAPBOX
=========================== */
.mapboxgl-popup-close-button {
  font-size: 18px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  top: 8px !important;
  right: 8px !important;
  border-radius: 50% !important;
  color: var(--text-secondary, #666) !important;
  background-color: transparent !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.mapboxgl-popup-close-button:hover {
  background-color: rgba(0, 0, 0, 0.08) !important;
  color: var(--text-primary, #333) !important;
}

.mapboxgl-popup-close-button:focus {
  outline: none !important;
  background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Evitar que o conteÃºdo do popup sobreponha o botÃ£o */
.mapboxgl-popup-content {
  padding: 16px 36px 16px 16px !important;
}

/* ===========================
   BOTÃƒO DE FECHAR DA SIDEBAR (MOBILE & DESKTOP)
   =========================== */
.sidebar-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: none;
  /* Oculto por padrÃ£o no desktop */
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.sidebar-close-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Exibir botÃ£o de fechar no mobile para melhorar usabilidade */
@media (max-width: 768px) {
  .sidebar-close-btn {
    display: flex !important;
  }
}

/* â”€â”€ Startup Search (dentro do Modal de Boas-Vindas) â”€â”€ */
.startup-search-box-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.startup-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-hover);
  border: 1.5px solid var(--border-solid);
  border-radius: 12px;
  padding: 12px 18px;
  width: 100%;
  transition: all 0.25s ease;
}

.startup-search-box:focus-within {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(85, 107, 47, 0.15);
}

.startup-search-box svg {
  color: var(--accent);
  flex-shrink: 0;
}

.startup-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  width: 100%;
}

.startup-search-box input::placeholder {
  color: var(--text-muted);
}

.startup-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-solid);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  text-align: left;
  display: none;
}

.startup-search-results.show {
  display: block;
}

/* â”€â”€ Escala GrÃ¡fica Otimizada (Premium) â”€â”€ */
.mapboxgl-ctrl-scale {
  position: relative;
  background: rgba(255, 255, 255, 0.9) !important;
  /* Claro translÃºcido com glassmorphism */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 6px;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  font-size: 10px !important;
  letter-spacing: 0.5px;
  padding: 6px 12px 14px 12px !important;
  /* Mais padding embaixo para dar espaÃ§o Ã  linha */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  opacity: 1;
}

/* Ticks verticais e linha da escala estilo rÃ©gua */
.mapboxgl-ctrl-scale::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  height: 5px;
  /* Altura dos ticks verticais */
  border-bottom: 1.5px solid var(--text-primary);
  border-left: 1.5px solid var(--text-primary);
  border-right: 1.5px solid var(--text-primary);
  box-sizing: border-box;
}

/* Ocultar em 3D (para evitar distorÃ§Ãµes de escala em perspectiva) */
.is-3d .mapboxgl-ctrl-scale {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) scale(0.95);
}

/* Anselin Local Moran UI Section styles */
.moran-panel-section {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  margin-top: 14px;
  margin-bottom: 12px;
}

.moran-status-text {
  font-size: 11px;
  color: var(--accent);
  margin-top: 6px;
  font-style: italic;
  line-height: 1.4;
  padding: 6px 10px;
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  animation: fadeInMoranStatus 0.25s ease-out;
}

@keyframes fadeInMoranStatus {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* â”€â”€ Sobrescritas para Popups Mapbox Censo CensitÃ¡rio (Tornar mais compactos) â”€â”€ */
.mapboxgl-popup-content {
  padding: 6px 8px 8px 8px !important;
  border-radius: var(--radius-md, 6px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid var(--border-light, rgba(0, 0, 0, 0.08)) !important;
}

.mapboxgl-popup-close-button {
  padding: 4px !important;
  font-size: 13px !important;
  color: var(--text-muted, #888) !important;
  line-height: 1 !important;
  outline: none !important;
}

/* Submenu EstatÃ­sticas */
.dropdown-submenu-wrapper {
  position: relative;
  width: 100%;
}
.dropdown-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border-solid);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4px);
  transition: all 0.15s ease-out;
  z-index: 110;
}
.dropdown-submenu-wrapper:hover .dropdown-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* â”€â”€ Posicionamento dos Controles Mapbox acima do Indicador de Zoom â”€â”€ */
.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl-group {
  margin-bottom: 54px !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NEWSLETTER â€” captura de e-mail (floating + portÃ£o da exportaÃ§Ã£o)
   Ver js/newsletter.js. Prefixo .nl- em tudo para que remover a feature
   seja apagar este bloco inteiro, sem caÃ§ar regras espalhadas.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ FormulÃ¡rio compartilhado â”€â”€ */
.nl-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nl-form .nl-email {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  box-sizing: border-box;
}

.nl-form .nl-email:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
}

/* Honeypot: fora da tela, invisÃ­vel para gente e para leitor de tela,
   mas presente no DOM para o bot preencher. display:none nÃ£o serve â€”
   muito bot ignora campo oculto assim. */
.nl-form .nl-website {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nl-consent {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--text-muted);
  cursor: pointer;
}

.nl-consent input {
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.nl-erro {
  display: none;
  font-size: 11px;
  color: #b4443c;
  background: rgba(180, 68, 60, 0.08);
  border-radius: 4px;
  padding: 5px 7px;
}

.nl-acoes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nl-btn {
  flex: 1 1 auto;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease;
}

.nl-btn-primario {
  background: var(--accent);
  color: #fff;
}

.nl-btn-primario:hover:not(:disabled) { filter: brightness(1.1); }
.nl-btn:disabled { opacity: 0.6; cursor: default; }

.nl-btn-secundario {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-light);
}

.nl-btn-secundario:hover { background: var(--accent-pale); color: var(--text-secondary); }

/* â”€â”€ 1. Floating â”€â”€ */
.nl-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1500; /* acima dos painÃ©is (1000) e abaixo de toasts/modais (2000+) */
  font-family: inherit;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.nl-floating.nl-visivel { opacity: 1; transform: translateY(0); }

.nl-floating-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  background: #fff;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(28, 39, 29, 0.13);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nl-floating-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(28, 39, 29, 0.18);
}

.nl-floating-icone { font-size: 14px; line-height: 1; }

.nl-floating-painel {
  display: none;
  width: 290px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 26px rgba(28, 39, 29, 0.18);
}

/* Alterna pÃ­lula â†” painel; o estado mora numa classe no container para
   que o JS nÃ£o precise mexer em style inline de dois elementos. */
.nl-floating.nl-aberto .nl-floating-pill { display: none; }
.nl-floating.nl-aberto .nl-floating-painel { display: block; }

.nl-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.nl-floating-header strong { font-size: 13px; color: var(--text-primary); }

.nl-floating-fechar {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.nl-floating-fechar:hover { color: var(--text-primary); }

.nl-floating-texto {
  margin: 0 0 11px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* â”€â”€ 2. PortÃ£o da exportaÃ§Ã£o â”€â”€ */
.nl-export-gate {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border-light);
}

.nl-export-titulo {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.nl-export-texto {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .nl-floating { right: 12px; bottom: 12px; left: 12px; }
  .nl-floating-painel { width: auto; }
  .nl-floating-pill { width: 100%; justify-content: center; }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODAL DE PÃGINA â€” Como Usar / Projeto / Equipe dentro do mapa
   Ver abrirPaginaModal() em js/ui.js.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.pagina-modal-overlay {
  display: none;                 /* o JS troca para flex ao abrir */
  position: fixed;
  inset: 0;
  z-index: 4000;                 /* acima dos painÃ©is; abaixo dos toasts (9999) */
  background: rgba(18, 26, 19, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.pagina-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1080px;
  height: 100%;
  max-height: 860px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(18, 26, 19, 0.35);
}

.pagina-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.pagina-modal-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.pagina-modal-acoes {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pagina-modal-acoes a {
  font-size: 11.5px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.pagina-modal-acoes a:hover { color: var(--accent); text-decoration: underline; }

.pagina-modal-acoes button {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.pagina-modal-acoes button:hover { color: var(--text-primary); }

/* O iframe ocupa o resto; a rolagem acontece DENTRO dele. */
#paginaModalFrame {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
}

/* Sem isso, rolar dentro do modal rola o mapa atrÃ¡s quando o iframe
   chega ao fim (scroll chaining). */
body.pagina-modal-aberto { overflow: hidden; }

@media (max-width: 720px) {
  .pagina-modal-overlay { padding: 0; }
  .pagina-modal { max-height: none; border-radius: 0; }
  .pagina-modal-acoes a { display: none; } /* espaÃ§o curto: fica sÃ³ o fechar */
}

/* â”€â”€ PÃ¡gina carregada DENTRO do modal (?embed=1) â”€â”€
   A classe Ã© posta pela prÃ³pria pÃ¡gina antes de renderizar (ver o script
   no <head> de projeto/como-usar/equipe), entÃ£o nÃ£o hÃ¡ piscar. */

/* O cabeÃ§alho da pÃ¡gina duplicaria a navegaÃ§Ã£o que jÃ¡ existe no mapa por
   trÃ¡s â€” e o botÃ£o "Explorar Mapa" levaria pra onde o usuÃ¡rio jÃ¡ estÃ¡. */
html.embed .header { display: none !important; }

/* Fora do modal, a faixa lateral em --bg-deep contrasta com a coluna
   branca do texto e emoldura a leitura. Dentro de um modal que jÃ¡ tem
   moldura prÃ³pria, ela vira uma segunda moldura concÃªntrica â€” some. */
html.embed body {
  background: #fff !important;
  padding-top: 0 !important;
}

/* Sem o cabeÃ§alho, a reserva de espaÃ§o dele deixaria um vÃ£o no topo e a
   altura calculada sobraria, cortando o fim do conteÃºdo. O respiro de 80px
   tambÃ©m Ã© generoso demais na altura reduzida de um modal. */
html.embed .content-page {
  margin-top: 0 !important;
  height: 100vh !important;
  padding-top: 32px !important;
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   COMO USAR â€” componentes do tutorial
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Marcador de captura pendente â”€â”€
   Um espaÃ§o reservado que DIZ o que precisa ser capturado, em vez de um
   retÃ¢ngulo cinza mudo. Enquanto a imagem nÃ£o existe, ele jÃ¡ informa; e
   fica Ã³bvio na pÃ¡gina o que ainda falta. */
.tut-print {
  border: 1.5px dashed var(--border-solid);
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #fbfcfb, #fbfcfb 10px, #f4f7f4 10px, #f4f7f4 20px);
  padding: 22px 24px;
  margin: 22px 0;
  text-align: left;
}

.tut-print-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.tut-print-titulo { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.tut-print-desc { font-size: 12px; line-height: 1.55; color: var(--text-secondary); margin: 0; }
.tut-print-arquivo { font-size: 10.5px; color: var(--text-muted); margin-top: 8px; font-family: ui-monospace, monospace; }

/* Quando a captura existir, troque o bloco por <img class="tut-img"> */
.tut-img {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin: 22px 0 8px;
  display: block;
}

.tut-legenda {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: -4px 0 22px;
  text-align: center;
}

/* â”€â”€ Diagramas SVG â”€â”€ */
.tut-diagrama {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin: 22px 0 8px;
  display: block;
  background: #fff;
}

/* â”€â”€ Passo a passo numerado â”€â”€ */
.tut-passos { counter-reset: passo; list-style: none; padding: 0; margin: 18px 0; }

.tut-passos li {
  counter-increment: passo;
  position: relative;
  padding: 0 0 16px 40px;
  border-left: 2px solid var(--border-light);
  margin-left: 13px;
}

.tut-passos li:last-child { border-left-color: transparent; padding-bottom: 0; }

.tut-passos li::before {
  content: counter(passo);
  position: absolute;
  left: -14px;
  top: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tut-passos strong { display: block; margin-bottom: 3px; color: var(--text-primary); }

/* â”€â”€ Caixas de destaque â”€â”€ */
.tut-nota, .tut-alerta {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.tut-nota { background: var(--accent-pale); border-left: 3px solid var(--accent); color: var(--text-secondary); }
.tut-alerta { background: rgba(180, 68, 60, .07); border-left: 3px solid #b4443c; color: var(--text-secondary); }
.tut-nota strong, .tut-alerta strong { color: var(--text-primary); }

/* â”€â”€ Atalho de teclado â”€â”€ */
kbd {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  background: #fff;
  border: 1px solid var(--border-solid);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text-primary);
}

/* â”€â”€ Ãndice lateral â”€â”€ */
.tut-indice {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0 34px;
}

.tut-indice-titulo { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.tut-indice ol { margin: 0; padding-left: 18px; columns: 2; column-gap: 28px; }
.tut-indice li { font-size: 13px; margin-bottom: 6px; break-inside: avoid; }
.tut-indice a { color: var(--text-secondary); text-decoration: none; }
.tut-indice a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 640px) { .tut-indice ol { columns: 1; } }

/* â”€â”€ CartÃ£o de ferramenta â”€â”€ */
.tut-ferramenta {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 20px 0;
  background: var(--bg-card);
}

.tut-ferramenta h3 { margin-top: 0 !important; }

.tut-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.tut-meta span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--bg-deep);
  color: var(--text-muted);
}

.tut-meta .tut-fonte { background: var(--accent-pale); color: var(--accent); }


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PESQUISAS GEORREFERENCIADAS â€” ver js/pesquisas.js
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Painel â”€â”€ */
.pesq-aviso {
  font-size: 11px;
  line-height: 1.5;
  background: rgba(200, 150, 40, 0.10);
  border-left: 3px solid #c8963f;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.pesq-aviso code { font-size: 10.5px; }

.pesq-busca {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
}

.pesq-busca:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }

.pesq-filtros { display: flex; gap: 6px; margin-top: 7px; }

.pesq-filtros select {
  flex: 1;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  font-size: 11.5px;
  font-family: inherit;
  background: #fff;
  color: var(--text-secondary);
}

.pesq-conta {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin: 10px 0 6px;
}

.pesq-lista { max-height: 340px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }

.pesq-item {
  display: flex;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s ease;
}

.pesq-item:hover { background: var(--accent-pale); }

/* Barra de cor Ã  esquerda: identifica o tipo sem gastar linha de texto */
.pesq-item-tipo { width: 3px; border-radius: 2px; flex-shrink: 0; }

.pesq-item-txt { min-width: 0; }
.pesq-item-titulo { font-size: 12.5px; font-weight: 600; color: var(--text-primary); line-height: 1.35; }
.pesq-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pesq-item-local { font-size: 10.5px; color: var(--accent); margin-top: 2px; }

.pesq-vazio { font-size: 12px; color: var(--text-muted); text-align: center; padding: 22px 8px; line-height: 1.5; }

/* â”€â”€ Popup â”€â”€ */
.pesquisa-popup .mapboxgl-popup-content { padding: 0; border-radius: 8px; overflow: hidden; }

.pesq-pop { max-height: 380px; overflow-y: auto; }

.pesq-pop-conta {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: 10px 14px 0;
}

/* VÃ¡rios itens no mesmo popup precisam de separador â€” sem ele as pesquisas
   se confundem numa lista corrida. */
.pesq-pop-item { padding: 12px 14px; }
.pesq-pop-item + .pesq-pop-item { border-top: 1px solid var(--border-light); }

.pesq-pop-exemplo {
  font-size: 10px;
  font-weight: 700;
  color: #a8752a;
  background: rgba(200, 150, 40, 0.12);
  padding: 4px 7px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.pesq-pop-tipo {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
}

.pesq-pop-titulo {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 7px 0 4px;
  line-height: 1.35;
}

.pesq-pop-meta { font-size: 11.5px; color: var(--text-secondary); line-height: 1.45; }
.pesq-pop-local { font-size: 11px; color: var(--accent); margin-top: 3px; }

.pesq-pop-resumo {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 9px 0 0;
}

.pesq-pop-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.pesq-pop-link:hover { text-decoration: underline; }
.pesq-pop-sem-link { display: inline-block; margin-top: 10px; font-size: 11.5px; color: var(--text-muted); font-style: italic; }

/* ===== IBGE Dropdown & Microdados Panel ===== */
#ibgeDropdownWrapper {
  position: relative;
  display: inline-block;
}

#ibgeDropdownWrapper:hover #ibgeDropdownMenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#ibgeDropdownMenu .dropdown-item {
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
}

#ibgeDropdownMenu .dropdown-item:hover {
  background: var(--bg-card-hover) !important;
}

.microdados-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card-hover);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-solid);
}

.md-tab-btn {
  flex: 1;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  font-family: inherit;
}

.md-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.md-tab-btn.active {
  color: #fff !important;
  background: var(--accent) !important;
  box-shadow: 0 1px 4px rgba(78, 109, 80, 0.3);
}

.md-kpi-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-solid);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.2s ease;
}

.md-kpi-card.md-clickable {
  cursor: pointer;
}

.md-kpi-card.md-clickable:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.md-kpi-card.md-active {
  border-color: var(--accent);
  background: rgba(78, 109, 80, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

.md-kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.md-kpi-val {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
}

.md-kpi-sub {
  font-size: 10.5px;
  color: var(--text-secondary);
}

/* Barra de ferramentas de mapeamento dos Microdados */
.md-map-toolbar {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-solid);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.md-map-toolbar-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.md-metric-select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border-solid);
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
}

.md-metric-select:focus {
  outline: none;
  border-color: var(--accent);
}

.md-clear-btn {
  padding: 3px 8px;
  border: 1px solid var(--border-solid);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.md-clear-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: #ef4444;
}

/* Painel expansÃ­vel de configuraÃ§Ãµes de estilo e quebras */
.md-settings-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-solid);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.md-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.md-settings-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.md-break-input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: 5px;
  text-align: center;
  font-family: inherit;
}

.md-break-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(78, 109, 80, 0.2);
}

/* Linha de mÃ©trica clicÃ¡vel */
.md-metric-row {
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.md-metric-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-solid);
}

.md-metric-row.md-active {
  background: rgba(78, 109, 80, 0.08);
  border-color: var(--accent);
}

.md-map-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(78, 109, 80, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Legenda Flutuante de Microdados no Mapa */
#microdadosMapLegend {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 20;
  background: var(--bg-panel, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-solid);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 220px;
  max-width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Inter', sans-serif;
}

.md-legend-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.md-legend-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.md-legend-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
}

.md-legend-close:hover {
  color: #ef4444;
}

.md-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

/* ===== Microdados: Ãndices SintÃ©ticos & VisualizaÃ§Ãµes Ricas ===== */
.md-index-card {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-solid);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.md-index-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.md-index-card.md-active {
  border-color: var(--accent);
  background: rgba(78, 109, 80, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

.md-index-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.md-index-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  line-height: 1.3;
}

.md-index-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.md-badge-high {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.md-badge-med {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.md-badge-mid {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.md-badge-low {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.md-index-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.md-index-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.md-chip {
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-weight: 500;
}

/* Sub-navegaÃ§Ã£o GrÃ¡ficos */
.md-subnav {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: var(--bg-card-hover);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-solid);
}

.md-subnav-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-align: center;
}

.md-subnav-btn.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(78, 109, 80, 0.3);
}

/* ContÃªineres de GrÃ¡ficos */
.md-chart-box {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-solid);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.md-radar-svg {
  width: 100%;
  height: auto;
  max-height: 270px;
  overflow: visible;
}

.md-scatter-svg {
  width: 100%;
  height: 260px;
  user-select: none;
  overflow: visible;
}

.md-scatter-point {
  cursor: pointer;
  transition: r 0.15s ease, stroke-width 0.15s ease;
}

.md-scatter-point:hover,
.md-scatter-point.active {
  stroke: #ffffff;
  stroke-width: 2.5px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

.md-scatter-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 11px;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -110%);
  white-space: nowrap;
  transition: opacity 0.1s ease;
}



/* MÃ“DULO PCA & K-MEANS */
.btn-cluster-k { padding: 5px 14px; font-size: 11.5px; font-weight: 700; border-radius: 6px; border: 1px solid #d1d9d1; background: #ffffff; color: #1c271d; cursor: pointer; transition: all 0.2s ease; opacity: 0.65; }
.btn-cluster-k:hover { border-color: #4E6D50; color: #4E6D50; opacity: 0.95; }
.btn-cluster-k.active { background: #2E5A36; color: #ffffff; border-color: #2E5A36; box-shadow: 0 2px 6px rgba(46, 90, 54, 0.25); opacity: 1 !important; }
.pca-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 12px; font-size: 10.5px; font-weight: 600; cursor: pointer; user-select: none; border: 1px solid #d8dfd8; background: #ffffff; color: #1c271d; transition: all 0.15s ease; }
.pca-chip input { margin: 0; cursor: pointer; accent-color: #4E6D50; }
.pca-chip.active { background: rgba(78, 109, 80, 0.12); border-color: #4E6D50; color: #1c271d; }
.cluster-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03); transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.cluster-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }

/* CARREGAMENTO SOB DEMANDA (LAZY PLACEHOLDERS) */
.dash-lazy-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fafaf7;
    border: 1px dashed rgba(78, 109, 80, 0.25);
    border-radius: 8px;
    padding: 24px 20px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.dash-lazy-placeholder:hover {
    background: #fdfdfb;
    border-color: #4E6D50;
}
.btn-dash-run-lazy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background: #4E6D50;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(78, 109, 80, 0.28);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-dash-run-lazy:hover {
    background: #3c543e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 109, 80, 0.38);
}
.btn-dash-run-lazy:active {
    transform: translateY(0);
}

/* BOTÃ•ES DE MAPA DAS TIPOLOGIAS */
.btn-cluster-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    background: #ffffff;
    color: #4E6D50;
    border: 1px solid #c8d4c9;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}
.btn-cluster-map:hover {
    background: #4E6D50;
    color: #ffffff;
    border-color: #4E6D50;
    box-shadow: 0 2px 6px rgba(78, 109, 80, 0.2);
}

.btn-cluster-map-all:hover {
    background: #4E6D50 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(78, 109, 80, 0.25) !important;
}

/* LEAFLET CUSTOM POPUP EM TIPOLOGIAS */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', sans-serif;
}
.leaflet-popup-content {
    margin: 10px 14px;
    line-height: 1.4;
}
.typology-filter-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #d1d9d1;
    background: #ffffff;
    color: #1c271d;
    cursor: pointer;
    transition: all 0.15s ease;
}
.typology-filter-btn:hover {
    border-color: #4E6D50;
    color: #4E6D50;
}
.typology-filter-btn.active {
    background: #4E6D50;
    color: #ffffff;
    border-color: #4E6D50;
}

/* Painel com layout flex ï¿½ body preenche o espaco vertical restante */
.floating-panel--flex {
  display: flex !important;
  flex-direction: column;
}
.floating-panel--flex.minimized {
  display: flex !important;
  height: 42px !important;
}
.floating-panel--flex[style*="display:none"],
.floating-panel--flex[style*="display: none"] {
  display: none !important;
}

/* ========================================================
   ESTUDO DE MASSAS (Proposal Mode UI & Stepper)
   ======================================================== */
#proposalPanel {
  width: 350px !important;
  max-height: calc(100vh - 120px);
}

#proposalPanel .panel-body {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 14px 16px;
}

/* Stepper horizontal */
.pm-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.pm-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  opacity: 0.45;
  transition: opacity var(--transition);
}

.pm-step-item.active {
  opacity: 1;
}

.pm-step-item.done {
  opacity: 0.9;
}

.pm-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1.5px solid var(--border-solid);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.pm-step-item.active .pm-step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-pale);
}

.pm-step-item.done .pm-step-num {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.pm-step-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
}

.pm-step-item.active .pm-step-title {
  color: var(--text-primary);
  font-weight: 700;
}

.pm-step-line {
  height: 2px;
  background: var(--border-light);
  flex: 0.6;
  margin-bottom: 15px;
  transition: background var(--transition);
}

.pm-step-line.done {
  background: var(--green);
}

/* Boxes informativos de orientação */
.pm-guide-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pm-guide-title {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-tips-list {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.pm-tips-list span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pm-kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: 3px;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Legenda das arestas */
.pm-edge-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.pm-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-legend-color {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

/* Spinner e Carregamento */
.pm-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pm-spin 0.8s linear infinite;
}

@keyframes pm-spin {
  to { transform: rotate(360deg); }
}

/* Card de Alerta / Falha de Download */
.pm-alert-box {
  background: #fff8f0;
  border: 1px solid #e09628;
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0;
  font-size: 12px;
  color: #5c3b00;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-alert-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b56c07;
}

/* Card de Resumo (Pronto) */
.pm-summary-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pm-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pm-summary-label {
  color: var(--text-muted);
}

.pm-summary-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Cotas de Medição (Permanentes / Estilo Limpo CAD) ── */
.cota-marker-container {
  pointer-events: auto;
  user-select: none;
  z-index: 10;
}

.cota-label-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  white-space: nowrap;
}

.cota-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.1;
  cursor: text;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px dashed transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  user-select: text;
  outline: none;
  display: inline-block;
  white-space: nowrap;
}

/* Efeito ao passar o mouse ou editar o texto inline */
.cota-label-wrapper:hover .cota-text {
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.45);
}

.cota-text:focus {
  border-color: #0284c7 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3) !important;
  color: #0f172a !important;
  text-shadow: none !important;
}

/* Botão de exclusão: oculto por padrão, discreto no hover */
.cota-del-btn {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(3px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #ffffff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cota-label-wrapper:hover .cota-del-btn {
  opacity: 1;
  pointer-events: auto;
}

.cota-del-btn:hover {
  background: #dc2626;
  transform: translateY(-50%) translateX(3px) scale(1.15);
}

/* Controles de estilo de cota no menu Medir */
.cota-color-dot {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cota-color-dot:hover {
  transform: scale(1.15);
}

.cota-color-dot.active {
  border-color: #0284c7;
  transform: scale(1.18);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35);
}

.cota-color-custom-wrap {
  position: relative;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 1px dashed var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #64748b);
  transition: all 0.15s ease;
}

.cota-color-custom-wrap:hover {
  border-color: var(--accent, #0284c7);
  color: var(--accent, #0284c7);
}

.cota-color-custom-input {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  opacity: 0;
  cursor: pointer;
}

.cota-btn-group {
  display: flex;
  background: var(--bg-deep, #f1f5f9);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.cota-btn-opt {
  border: none;
  background: transparent;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cota-btn-opt:hover {
  color: var(--text-primary, #0f172a);
}

.cota-btn-opt.active {
  background: var(--bg-card, #ffffff);
  color: var(--accent, #0284c7);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}


/* ── Map Loading State (permite navegação pan/zoom durante carregamento) ── */
body.map-loading-busy #map canvas {
  cursor: progress;
}


/* ══════════════════════════════════════════════════════════════════════════
   FICHÁRIO LATERAL ESQUERDO: LEGENDAS + DIRETRIZES URBANÍSTICAS (LC 812/2026)
   ══════════════════════════════════════════════════════════════════════════ */
.sidebar-binder-toggle-top {
  top: calc(50% - 76px) !important;
  height: 138px !important;
}

.sidebar-binder-toggle-bottom {
  top: calc(50% + 76px) !important;
  height: 146px !important;
}

.sidebar-diretrizes-toggle {
  left: 380px;
  border-left: none;
  background: var(--navy);
}

.sidebar-diretrizes-toggle.collapsed {
  left: 0;
  background: var(--navy-light);
}

.sidebar-diretrizes-toggle.collapsed svg {
  transform: rotate(0deg);
}

.sidebar-diretrizes-toggle svg {
  transform: rotate(180deg);
}

.sidebar-diretrizes {
  left: 0;
  width: 380px;
  border-right: 1px solid var(--border-solid);
  z-index: 91;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.sidebar-diretrizes.sidebar-diretrizes--expanded {
  width: 640px;
}

@media (max-width: 768px) {
  .sidebar-diretrizes,
  .sidebar-diretrizes.sidebar-diretrizes--expanded {
    width: 100%;
    left: 0 !important;
  }
}

.sidebar-binder-nav {
  display: flex;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-solid);
  flex-shrink: 0;
}

.sidebar-binder-tab {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-binder-tab:last-child {
  border-right: none;
}

.sidebar-binder-tab:hover {
  background: var(--accent-pale);
  color: var(--text-primary);
}

.sidebar-binder-tab.active {
  background: var(--bg-panel);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.diretrizes-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--border-solid);
  background: var(--bg-deep);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.diretrizes-expand-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.dir-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-solid);
  background: var(--accent-pale);
  color: var(--accent);
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  margin-left: 5px;
  line-height: 1;
  transition: all 0.15s;
}

.dir-help-btn:hover,
.dir-help-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.dir-help-box {
  display: none;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--bg-deep);
  border-left: 3px solid var(--accent);
  font-size: 11.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

.dir-help-box.show {
  display: block;
}

.dir-grid-expanded {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sidebar-diretrizes--expanded .dir-grid-expanded {
  grid-template-columns: 1fr 1fr;
}

.sidebar-diretrizes--expanded .dir-grid-full {
  grid-column: 1 / -1;
}

/* ==========================================================================
   SIMULADOR RETRÁTIL E DIAGRAMA PARAMÉTRICO DE ZONEAMENTO
   ========================================================================== */
.simulador-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border-solid);
  color: var(--text-primary);
  font-family: 'Manrope', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 10px;
}
.simulador-toggle-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
}
.simulador-toggle-btn.active {
  background: var(--accent-pale);
  border-color: var(--accent);
  color: var(--accent);
}
.simulador-toggle-btn .sim-toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}
.simulador-toggle-btn.active .sim-toggle-icon {
  transform: rotate(180deg);
}
.simulador-retratil-container {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-top: none;
  padding: 12px;
}
.simulador-retratil-container.show {
  display: block;
}
.simulador-preset-btn {
  padding: 4px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border-solid);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.simulador-preset-btn:hover,
.simulador-preset-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.simulador-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-solid);
  outline: none;
  border-radius: 3px;
  margin: 6px 0;
}
.simulador-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.simulador-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent);
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* Estilos dos Toggles e Checkboxes do Simulador 3D */
.simulador-toggles-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-solid);
  padding: 10px 12px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.simulador-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-primary);
  cursor: pointer;
}
.simulador-toggle-row.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.simulador-toggle-row input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}
.simulador-toggle-row.disabled input[type="checkbox"] {
  cursor: not-allowed;
}
.simulador-bonus-pill {
  display: inline-block;
  padding: 1px 5px;
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #ca8a04;
  font-size: 9.5px;
  font-weight: 800;
  border-radius: 2px;
  margin-left: 4px;
}
.simulador-view-mode-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.simulador-view-mode-btn {
  padding: 4px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border-solid);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.simulador-view-mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ==========================================================================
   INTERNACIONALIZAÇÃO (i18n) & ALTERNATIVA A: DASHBOARD INTEGRADO AO MAPA
   ========================================================================== */

/* Seletor de Idioma PT | EN no Cabeçalho */
.lang-selector-pill {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 2px 4px;
  gap: 2px;
  margin-right: 12px;
  font-family: 'Inter', sans-serif;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.lang-btn {
  background: transparent;
  border: none;
  color: #475569;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.lang-btn:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.06);
}
.lang-btn.active {
  background: #4E6D50 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.lang-sep {
  color: #94a3b8;
  font-size: 10.5px;
  line-height: 1;
  padding: 0 1px;
}

/* ==========================================================================
   ESTUDO DE MASSAS COM ZONEAMENTO (LC 812/2026 - UBERLÂNDIA)
   ========================================================================== */

.pm-picking {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
  color: #ffffff !important;
  animation: pmPulsePicking 1.6s ease infinite alternate;
}

@keyframes pmPulsePicking {
  from { box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3); }
  to { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0); }
}

.pmz-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-left: 4px solid var(--accent, #4E6D50);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: 'Inter', sans-serif;
}

.pmz-card-warn {
  border-left-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e !important;
}

.pmz-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  padding: 4px 0;
}

.pmz-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pmz-swatch {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.pmz-title {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  line-height: 1.25;
}

.pmz-sub {
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-secondary, #475569);
}

.pmz-law {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}

.pmz-link {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-solid, #cbd5e1);
  background: var(--bg-deep, #f8fafc);
  color: var(--accent, #2563eb);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.pmz-link:hover {
  background: var(--accent, #2563eb);
  color: #ffffff;
}

.pmz-overlap {
  font-size: 10.5px;
  color: #b45309;
  background: #fef3c7;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  line-height: 1.35;
}

.pmz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-deep, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.pmz-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pmz-grid span {
  font-size: 9.5px;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.pmz-grid b {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
}

.pmz-ca-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-secondary, #475569);
  margin-bottom: 8px;
  padding: 4px 0;
}

.pmz-ca-toggle button {
  background: var(--bg-deep, #f8fafc);
  border: 1px solid var(--border-solid, #cbd5e1);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  transition: all 0.15s;
}

.pmz-ca-toggle button.active {
  background: var(--accent, #4E6D50);
  border-color: var(--accent, #4E6D50);
  color: #ffffff;
  font-weight: 700;
}

.pmz-checks {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--text-secondary, #334155);
  border-top: 1px dashed var(--border-light, #e2e8f0);
  padding-top: 6px;
  margin-bottom: 6px;
}

.pmz-chk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 800;
  margin-right: 4px;
  line-height: 1;
}

.pmz-ok { background: #dcfce7; color: #15803d; }
.pmz-bad { background: #fee2e2; color: #b91c1c; }
.pmz-na { background: #f1f5f9; color: #64748b; }

.pmz-muted {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
}

.pmz-notes {
  font-size: 10px;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
  margin-bottom: 6px;
  padding-left: 2px;
}

.pmz-foot {
  font-size: 9.5px;
  color: var(--text-muted, #94a3b8);
  border-top: 1px solid var(--border-light, #e2e8f0);
  padding-top: 5px;
  line-height: 1.3;
}

.pmz-viab-details {
  margin: 6px 0 8px;
  background: var(--bg-deep, #f8fafc);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 10.5px;
}
.pmz-viab-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent, #4E6D50);
  user-select: none;
  outline: none;
}
.pmz-viab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light, #e2e8f0);
}
.pmz-viab-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pmz-viab-grid span {
  font-size: 9px;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
}
.pmz-viab-grid b {
  font-size: 11px;
  color: var(--text-primary, #0f172a);
}

/* ── UX Unificada: Grupos do Menu & Barras de Alternância Rápida ── */
.menubar-group-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #6b7d6e);
  padding: 6px 10px 3px;
  user-select: none;
}
.menubar-group-sep {
  height: 1px;
  background: var(--border-light, #e5e7eb);
  margin: 4px 6px;
}

.trama-hub-nav {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  background: var(--bg-card-hover, #f8faf8);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.trama-hub-pill {
  flex: 1 1 auto;
  min-width: fit-content;
  padding: 5px 7px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--border-solid, #d1d5db);
  border-radius: 0px;
  background: var(--bg-panel, #ffffff);
  color: var(--text-secondary, #4b5563);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
  font-family: inherit;
}
.trama-hub-pill:hover {
  border-color: var(--accent, #4E6D50);
  color: var(--accent, #4E6D50);
}
.trama-hub-pill.active {
  background: var(--accent, #4E6D50);
  border-color: var(--accent, #4E6D50);
  color: #ffffff;
  font-weight: 700;
}

/* ===========================
   TOAST INFERIOR COMPACTO (-30%) & PROCESSOS ATIVOS
=========================== */
.toast {
  top: auto;
  bottom: 78px;
  z-index: 10020;
  border-radius: 0px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 6px 14px;
  font-size: 9.5px;
  letter-spacing: 0.4px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.map-loading-overlay {
  bottom: 72px;
}

.map-loading-inner {
  min-width: 240px;
  max-width: 340px;
  padding: 7px 11px;
  border-radius: 0px;
  font-size: 9.5px;
  gap: 5px;
}

.map-loading-text {
  font-size: 9.5px;
}

.trama-process-bar {
  position: fixed;
  bottom: 78px;
  right: 16px;
  z-index: 9998;
  display: none;
  flex-direction: column;
  gap: 5px;
  max-width: 300px;
}

.trama-process-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(78, 109, 80, 0.35);
  padding: 6px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.trama-process-cancel {
  border: 1px solid #ef4444;
  background: #fff;
  color: #ef4444;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.trama-process-cancel:hover {
  background: #ef4444;
  color: #fff;
}

.layer-context-menu {
  position: fixed;
  z-index: 10050;
  min-width: 195px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-solid, #cbd5e1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
  padding: 4px 0;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
}

.layer-context-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary, #1e293b);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.layer-context-menu button:hover {
  background: rgba(78, 109, 80, 0.1);
  color: var(--accent, #4E6D50);
}

/* ===========================
   MENU DADOS (2 COLUNAS) & BADGES MUNICIPAIS
=========================== */
.menubar-dropdown--cols {
  min-width: 500px;
  max-width: calc(100vw - 24px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
  padding: 10px 12px;
  border-radius: 0px;
}

.menubar-dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.menubar-dropdown-col + .menubar-dropdown-col {
  border-left: 1px solid var(--border-light);
  padding-left: 14px;
}

.menubar-item.expanded > .menubar-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dados-mun-badge {
  font-size: 9px;
  padding: 1px 5px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0px;
}

.dados-mun-item.tool-disabled {
  opacity: 0.48;
}

@media (max-width: 768px) {
  .menubar-dropdown--cols {
    min-width: 260px;
    grid-template-columns: 1fr;
  }
  .menubar-dropdown-col + .menubar-dropdown-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-light);
    padding-top: 8px;
    margin-top: 6px;
  }
}

/* ===========================
   SUBMENU INFO MUNICIPAIS & PAINEL OSM FLUTUANTE
=========================== */
.dropdown-submenu-wrapper.expanded > .menubar-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.dados-info-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent, #4E6D50);
  border: 1px solid rgba(78, 109, 80, 0.45);
  background: rgba(78, 109, 80, 0.08);
  cursor: help;
  flex-shrink: 0;
  margin-left: 4px;
}

.dados-info-tip-box {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 245px;
  padding: 8px 10px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: 10060;
  pointer-events: none;
}

.dados-info-tip-wrap:hover .dados-info-tip-box,
.dados-info-tip-wrap:focus .dados-info-tip-box {
  display: block;
}

.osm-floating-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.osm-floating-list label.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
}

/* ===========================
   TRANSPARENCIA DE 25% NOS MENUS LATERAIS
=========================== */
.sidebar,
.sidebar-left,
.sidebar-right,
#sidebarDiretrizes {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ===========================
   DOCK INFERIOR COMPACTA (FASE 2: DESFAZER & 2D/3D)
=========================== */
.toolbar-2d {
  padding: 6px 12px;
  gap: 6px;
  border-radius: 0px;
}

.toolbar-undo-btn:disabled,
.toolbar-undo-btn.tool-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: auto;
}

.toolbar-3d-btn.active-tool {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ===========================
   FASE 3: CHIP DE RECORTE ATIVO & POPOVER DE ESTILO DAS COTAS
=========================== */
.active-crop-chip {
  position: fixed;
  top: calc(var(--header-h, 52px) + 46px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--accent, #4E6D50);
  border-radius: 0px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text-primary, #1c271d);
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}

.active-crop-chip-clear {
  border: 1px solid rgba(139, 38, 53, 0.45);
  background: rgba(139, 38, 53, 0.08);
  color: #8b2635;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 0px;
  cursor: pointer;
}

.active-crop-chip-clear:hover {
  background: #8b2635;
  color: #fff;
  border-color: #8b2635;
}

.cota-style-popover {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9600;
  width: 270px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-solid, rgba(78, 109, 80, 0.35));
  border-radius: 0px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  font-family: 'Inter', sans-serif;
}

.cota-style-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent, #4E6D50);
}

/* ===========================
   ESTILO EDITORIAL PARA MEDIÇÃO & COTAS (TRAMA)
=========================== */
.cota-text {
  font-family: 'Manrope', 'Inter', sans-serif !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
  border-radius: 0px !important;
  padding: 2px 6px !important;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  paint-order: stroke fill;
  transition: border-color 0.15s ease !important;
}

.cota-label-wrapper:hover .cota-text {
  border-color: transparent !important;
  background: transparent !important;
}

.cota-text:focus {
  border-color: var(--accent, #4E6D50) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(78, 109, 80, 0.28) !important;
  color: #1c271d !important;
  -webkit-text-stroke: 0px transparent !important;
  text-shadow: none !important;
}

.cota-del-btn {
  border-radius: 0px !important;
  background: #8b2635 !important;
}

.cota-color-dot {
  border-radius: 0px !important;
  width: 16px !important;
  height: 16px !important;
  border: 1px solid rgba(28, 39, 29, 0.22) !important;
  box-shadow: none !important;
}

.cota-color-dot.active {
  border-color: var(--navy, #2e3b23) !important;
  box-shadow: 0 0 0 2px rgba(78, 109, 80, 0.4) !important;
}

.cota-color-custom-wrap {
  border-radius: 0px !important;
  width: 16px !important;
  height: 16px !important;
  border: 1px dashed var(--accent, #4E6D50) !important;
  color: var(--accent, #4E6D50) !important;
}

.cota-btn-group {
  background: var(--bg-deep, #f5f5f0) !important;
  border: 1px solid var(--border-light);
  border-radius: 0px !important;
  padding: 2px;
}

.cota-btn-opt {
  border-radius: 0px !important;
  color: var(--text-secondary, #425244);
  font-family: 'Inter', sans-serif;
}

.cota-btn-opt.active {
  background: var(--accent, #4E6D50) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.measure-label {
  background: rgba(245, 245, 240, 0.96) !important;
  color: #1c271d !important;
  border: 1px solid var(--accent, #4E6D50) !important;
  border-radius: 0px !important;
  font-family: 'Manrope', 'Inter', sans-serif !important;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(28, 39, 29, 0.16) !important;
}

/* === FASE 4: PADRONIZACAO EDITORIAL, ATALHOS & RESPONSIVIDADE === */
.tool-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0px;
  font-family: 'Manrope', 'Inter', monospace;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.tool-btn:hover .tool-kbd,
.tool-btn.active-tool .tool-kbd {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.toolbar-2d[data-state="icons"] .tool-kbd {
  display: none !important;
}

.dropdown-group-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #6b7d6e);
  padding: 6px 10px 3px;
  user-select: none;
}

.dropdown-group-label--bordered {
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  padding-top: 8px;
}

.menubar-btn,
.menubar-btn-action {
  white-space: nowrap;
  flex-shrink: 0;
}

.dropdown-menu,
.menubar-dropdown,
.menubar-submenu,
.layer-context-menu,
.trama-process-item,
.trama-process-cancel,
.dados-info-tip-wrap,
.dados-info-tip-box {
  border-radius: 0px !important;
}

@media (min-width: 769px) {
  #menuDadosDropdown {
    overflow: visible !important;
  }

  .menubar-dropdown:not(:has(.menubar-submenu)),
  #munInfoSubmenu {
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }
}

@media (max-width: 1280px) and (min-width: 769px) {
  .app-menubar {
    padding: 0 10px;
  }

  .menubar-inner {
    gap: 2px;
  }

  .menubar-btn {
    padding: 0 8px;
    font-size: 12px;
    gap: 5px;
  }

  .menubar-btn-action {
    padding: 0 9px;
    font-size: 11.5px;
    gap: 5px;
  }
}

@media (max-width: 1120px) and (min-width: 769px) {
  .app-menubar {
    padding: 0 8px;
  }

  .menubar-inner {
    gap: 1px;
  }

  .menubar-btn {
    padding: 0 6px;
    font-size: 11.5px;
    gap: 4px;
  }

  .menubar-btn-action {
    padding: 0 7px;
    font-size: 11px;
    gap: 4px;
  }

  .menubar-btn-action svg {
    width: 13px;
    height: 13px;
  }

  #btnShareDeepLink span {
    display: none;
  }

  #btnShareDeepLink {
    padding: 0 8px;
  }
}

@media (max-width: 768px) {
  .toolbar-2d,
  .tool-btn,
  .ctrl-btn,
  .app-menubar,
  .sun-panel,
  .transporte-panel,
  .estilo-panel,
  .draw-panel,
  .floating-panel {
    border-radius: 0px !important;
  }

  .toolbar-2d {
    bottom: 14px;
    width: auto;
    max-width: calc(100vw - 16px);
    padding: 6px 8px;
    gap: 4px;
    justify-content: center;
  }

  .toolbar-2d-tools {
    flex-wrap: nowrap;
    gap: 3px;
    width: auto;
    justify-content: center;
  }

  .toolbar-2d-sep {
    height: 18px;
    margin: 0 2px;
  }

  .tool-btn {
    padding: 8px;
  }

  .tool-kbd {
    display: none !important;
  }

  #drawDropdown,
  #measureDropdown {
    left: 50% !important;
    right: auto !important;
    max-width: calc(100vw - 24px);
    transform: translateX(-50%) translateY(10px) !important;
  }

  .dropdown-wrapper:hover #drawDropdown,
  .dropdown-wrapper:hover #measureDropdown,
  #drawDropdown.show,
  #measureDropdown.show {
    transform: translateX(-50%) translateY(0) !important;
  }

  .active-crop-chip {
    top: 14px;
    max-width: calc(100vw - 120px);
    font-size: 10.5px;
    padding: 4px 8px;
  }

  .cota-style-popover {
    bottom: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
  }

  .app-menubar {
    width: min(260px, calc(100vw - 76px)) !important;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

  .dados-info-tip-box {
    left: 0;
    transform: none;
    width: 205px;
  }
}

/* === MODAL NOVIDADES (CARROSSEL EDITORIAL) === */
.wn-overlay {
  position: fixed;
  inset: 0;
  z-index: 100500;
  background: rgba(28, 39, 29, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wn-dialog {
  width: 560px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 28px);
  background: #ffffff;
  border: 1px solid var(--accent, #4E6D50);
  border-radius: 0px;
  box-shadow: 0 20px 50px rgba(28, 39, 29, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.wn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-deep, #f5f5f0);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.wn-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wn-badge-brand {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy, #2e3b23);
}

.wn-step-counter {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--accent, #4E6D50);
}

.wn-close-btn {
  width: 26px;
  height: 26px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #6b7d6e);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wn-close-btn:hover {
  background: #ffffff;
  border-color: var(--border-solid);
  color: var(--text-primary, #1c271d);
}

.wn-body {
  overflow-y: auto;
  flex: 1 1 auto;
}

.wn-visual {
  background: var(--bg-deep, #f5f5f0);
  border-bottom: 1px solid var(--border-light);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 158px;
}

.wn-visual svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
}

.wn-content {
  padding: 18px 22px 16px;
}

.wn-tag {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent, #4E6D50);
  margin-bottom: 5px;
}

.wn-title {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary, #1c271d);
  margin: 0 0 12px;
}

.wn-intro-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary, #1c271d);
  background: var(--bg-deep, #f5f5f0);
  border-left: 3px solid var(--accent, #4E6D50);
  padding: 8px 10px;
  margin: 0 0 12px;
}

.wn-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wn-list li {
  position: relative;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary, #425244);
}

.wn-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: var(--accent, #4E6D50);
  border-radius: 0px;
}

.wn-list code {
  font-family: 'Manrope', monospace;
  font-size: 11px;
  padding: 1px 4px;
  background: var(--bg-deep, #f5f5f0);
  border: 1px solid var(--border-light);
}

.wn-nl-subtitle {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary, #425244);
  margin: 0 0 12px;
}

.wn-nl-slot .nl-email,
.wn-nl-slot .nl-erro,
.wn-nl-slot .nl-btn {
  border-radius: 0px !important;
}

.wn-nl-slot .nl-btn-primario {
  background: var(--accent, #4E6D50);
  border-color: var(--accent, #4E6D50);
}

.wn-contrib-wrap {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.wn-contrib-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, #4E6D50);
  text-decoration: none;
}

.wn-contrib-link:hover {
  text-decoration: underline;
}

.wn-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.wn-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wn-dot {
  width: 10px;
  height: 6px;
  padding: 0;
  border: 1px solid rgba(78, 109, 80, 0.35);
  background: var(--bg-deep, #f5f5f0);
  border-radius: 0px;
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease;
}

.wn-dot.active {
  width: 24px;
  background: var(--accent, #4E6D50);
  border-color: var(--accent, #4E6D50);
}

.wn-btn-ghost,
.wn-btn-primary {
  padding: 7px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border-radius: 0px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.wn-btn-ghost {
  background: transparent;
  color: var(--text-secondary, #425244);
  border: 1px solid var(--border-light);
}

.wn-btn-ghost:hover {
  background: var(--bg-deep, #f5f5f0);
  color: var(--text-primary, #1c271d);
}

.wn-btn-primary {
  background: var(--accent, #4E6D50);
  color: #ffffff;
  border: 1px solid var(--accent, #4E6D50);
}

.wn-btn-primary:hover {
  background: var(--navy, #2e3b23);
  border-color: var(--navy, #2e3b23);
}

@media (max-width: 768px) {
  .wn-overlay {
    padding: 10px;
  }

  .wn-dialog {
    width: 100%;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .wn-visual {
    min-height: 118px;
    padding: 12px;
  }

  .wn-content {
    padding: 14px 16px 12px;
  }

  .wn-title {
    font-size: 15.5px;
    margin-bottom: 10px;
  }

  .wn-intro-text {
    font-size: 12px;
    padding: 7px 9px;
    margin-bottom: 10px;
  }

  .wn-list li {
    font-size: 12px;
  }

  .wn-nl-slot .nl-acoes {
    flex-direction: column;
  }

  .wn-footer {
    padding: 10px 14px;
  }
}

/* === MODAL COMPARACAO DE ISOCRONAS === */
.walk-pinned-list {
  margin-top: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-deep, #f5f5f0);
}

.walk-pinned-header {
  padding: 5px 8px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent, #4E6D50);
  border-bottom: 1px solid var(--border-light);
}

.walk-pinned-items {
  display: flex;
  flex-direction: column;
  max-height: 150px;
  overflow-y: auto;
}

.walk-pinned-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 6px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
}

.walk-pinned-item:last-child {
  border-bottom: none;
}

.walk-pinned-item.active {
  background: rgba(78, 109, 80, 0.08);
}

.walk-pinned-item.is-hidden {
  opacity: 0.55;
}

.walk-pinned-main {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.walk-pinned-swatch {
  width: 8px;
  height: 22px;
  flex-shrink: 0;
}

.walk-pinned-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.walk-pinned-meta strong {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #1c271d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.walk-pinned-meta small {
  font-size: 9.5px;
  color: var(--text-muted, #6b7d6e);
}

.walk-pinned-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.walk-pinned-act {
  padding: 2px 5px;
  font-size: 9.5px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-deep, #f5f5f0);
  color: var(--text-secondary, #425244);
  cursor: pointer;
  border-radius: 0px;
}

.walk-pinned-act:hover {
  border-color: var(--accent, #4E6D50);
  color: var(--accent, #4E6D50);
}

.walk-pinned-del:hover {
  border-color: #8b2635;
  color: #8b2635;
}

.wc-col-focus {
  margin-top: 3px;
  align-self: flex-start;
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 700;
  border: 1px solid var(--border-solid);
  background: #ffffff;
  color: var(--accent, #4E6D50);
  cursor: pointer;
  border-radius: 0px;
}

.wc-col-focus:hover {
  background: var(--accent, #4E6D50);
  color: #ffffff;
}

.walk-compare-trigger {
  margin-top: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--accent, #4E6D50);
  background: var(--bg-deep, #f5f5f0);
  color: var(--navy, #2e3b23);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  border-radius: 0px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.walk-compare-trigger:hover {
  background: var(--accent, #4E6D50);
  color: #ffffff;
}

.wc-overlay {
  position: fixed;
  inset: 0;
  z-index: 100450;
  background: rgba(28, 39, 29, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wc-dialog {
  width: 880px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  background: #ffffff;
  border: 1px solid var(--accent, #4E6D50);
  border-radius: 0px;
  box-shadow: 0 20px 50px rgba(28, 39, 29, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.wc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-deep, #f5f5f0);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.wc-eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent, #4E6D50);
  text-transform: uppercase;
}

.wc-title {
  margin: 2px 0 0;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary, #1c271d);
}

.wc-close-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #6b7d6e);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 0px;
}

.wc-close-btn:hover {
  background: #ffffff;
  border-color: var(--border-solid);
  color: var(--text-primary, #1c271d);
}

.wc-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.wc-controls-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.wc-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary, #425244);
}

.wc-ctrl-group select {
  padding: 4px 8px;
  border: 1px solid var(--border-solid);
  border-radius: 0px;
  background: var(--bg-deep, #f5f5f0);
  color: var(--text-primary, #1c271d);
  font-size: 11.5px;
  font-family: inherit;
}

.wc-mode-pill {
  font-size: 11.5px;
  color: var(--text-secondary, #425244);
}

.wc-count-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--bg-deep, #f5f5f0);
  border: 1px solid var(--border-light);
  color: var(--accent, #4E6D50);
}

.wc-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wc-loading {
  padding: 28px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted, #6b7d6e);
}

.wc-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.wc-bar-card {
  border: 1px solid var(--border-light);
  background: var(--bg-deep, #f5f5f0);
  padding: 10px 12px;
}

.wc-bar-title {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy, #2e3b23);
  margin-bottom: 8px;
}

.wc-bar-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wc-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary, #425244);
  margin-bottom: 2px;
}

.wc-bar-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wc-bar-name i {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.wc-bar-track {
  height: 6px;
  background: rgba(78, 109, 80, 0.14);
  overflow: hidden;
}

.wc-bar-fill {
  height: 100%;
}

.wc-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
}

.wc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.wc-table th,
.wc-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  text-align: left;
}

.wc-table th:last-child,
.wc-table td:last-child {
  border-right: none;
}

.wc-table thead th {
  background: var(--bg-deep, #f5f5f0);
  font-weight: 700;
  color: var(--text-primary, #1c271d);
  vertical-align: top;
}

.wc-col-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wc-col-head i {
  display: inline-block;
  width: 18px;
  height: 4px;
}

.wc-col-head small {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #6b7d6e);
}

.wc-section-row td {
  background: rgba(78, 109, 80, 0.08);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent, #4E6D50);
  padding: 5px 10px;
}

.wc-row-label {
  font-weight: 600;
  color: var(--text-secondary, #425244);
  white-space: nowrap;
}

.wc-best-cell {
  background: rgba(78, 109, 80, 0.1);
  color: var(--navy, #2e3b23);
  font-weight: 700;
}

.wc-empty-urban {
  font-size: 11px;
  color: var(--text-muted, #6b7d6e);
  font-style: italic;
}

@media (max-width: 768px) {
  .wc-overlay {
    padding: 8px;
  }
  .wc-dialog {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .wc-header,
  .wc-controls,
  .wc-body {
    padding: 10px 12px;
  }
}
