/* ===========================
   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(85, 107, 47, 0.12);
  --border-light: rgba(85, 107, 47, 0.22);
  --border-solid: rgba(85, 107, 47, 0.35);

  --text-primary: #1e2815;
  --text-secondary: #4a543b;
  --text-muted: #747d6a;

  /* Verde Anos 70 (Olive Moss) */
  --accent: #556b2f;
  --accent-light: #6b8e23;
  --accent-pale: rgba(85, 107, 47, 0.12);

  /* 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 */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;

  /* 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;
  --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 {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Título em estilo clássico — sem gradiente neon */
.header-title {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.header-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* 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;
}

/* Controles centralizados */
.header-controls {
  display: none; /* Removido do header */
}

.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;
  align-items: center;
  gap: 12px;
  background: rgba(20, 28, 44, 0.92);
  border: 1px solid rgba(74, 128, 180, 0.35);
  border-radius: 40px;
  padding: 8px 18px 8px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(74, 128, 180, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toolbar-2d--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Em modo 3D: esconde os botões exclusivos de 2D, mantém Estilo e Zoneamento/Medidas */
.toolbar-2d--3d #osmDropdownWrapper,
.toolbar-2d--3d #osmSep,
.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: 1px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 24px;
  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(74, 128, 180, 0.18);
  border-color: rgba(74, 128, 180, 0.4);
  color: #fff;
}

.tool-btn.active-tool {
  background: rgba(79, 70, 229, 0.22);
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 10px rgba(74, 128, 180, 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: rgba(20, 28, 44, 0.95);
  border: 1px solid rgba(74, 128, 180, 0.35);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
}

.dropdown-menu::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(74, 128, 180, 0.35) transparent transparent transparent;
}

.dropdown-menu::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: rgba(20, 28, 44, 0.95) transparent transparent transparent;
  z-index: 1;
}

.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: 8px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  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;
}

.dropdown-item svg {
  color: inherit;
}

.dropdown-item:hover {
  background: rgba(74, 128, 180, 0.25);
  color: #fff;
}

.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-wrapper:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}


/* ===========================
   LAYOUT PRINCIPAL
=========================== */
.main-layout {
  position: fixed;
  top: var(--header-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: 12px;
  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: 12px;
  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: 8px;
  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: 2px;
  /* 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;
}

/* Barra de estatísticas */
.map-stats {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: var(--bg-dark);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-md);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-md);
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border-solid);
}

/* 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;
}

/* Novo container de botões flutuantes sobre o mapa (Móvel) */
.map-controls-floating {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  user-select: none;
}

.map-controls-floating:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.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);
}

.tools-content-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease;
  overflow: hidden;
  max-width: 1000px; /* Largura máxima grande o suficiente */
}

/* Estado Minimizado */
.map-controls-floating.minimized .tools-content-wrapper {
  max-width: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.map-controls-floating.minimized .ctrl-sep {
  display: none;
}

.map-controls-floating.minimized {
  padding: 4px;
}

.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);
}

.map-controls-floating.minimized .toggle-tools-btn svg {
  transform: rotate(180deg);
}

.map-controls-floating .ctrl-btn {
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: transparent;
}

.map-controls-floating .ctrl-btn:hover {
  background: var(--accent-pale);
}

.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 esquerda do painel */
.sidebar-toggle-btn {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  align-self: stretch;
  background: var(--bg-dark);
  border: none;
  border-left: 1px solid var(--border-solid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.18s, color 0.18s;
  z-index: 20;
  padding: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--accent-pale);
  color: var(--accent-light);
}

.sidebar-toggle-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Quando a sidebar está colapsada, gira a seta 180° */
.sidebar-toggle-btn.collapsed svg {
  transform: rotate(180deg);
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-solid);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* animação de colapsar/expandir */
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

/* Estado colapsado */
.sidebar.sidebar--collapsed {
  width: 0;
  opacity: 0;
  pointer-events: none;
  border-left-width: 0;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 4px;
}

.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 State */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
  gap: 12px;
}

.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;
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* 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);
}

.status-badge {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.status-badge.disponivel {
  background: var(--green-bg);
  color: var(--green-light);
  border: 1px solid rgba(46, 139, 87, 0.4);
}

.status-badge.reservado {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(201, 132, 10, 0.4);
}

.status-badge.vendido {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(185, 64, 64, 0.4);
}

.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;
}

/* Card de preço — clássico com borda dourada */
.price-card {
  margin: 14px 16px;
  padding: 16px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-solid);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  text-align: center;
}

.price-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.price-value {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1.1;
}

.price-per-m2 {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 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);
}

/* Botões CTA */
.cta-buttons {
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.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(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 10px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);

  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 10000;

  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.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;
  }

  .sidebar {
    height: 42vh;
    border-left: none;
    border-top: 1px solid var(--border-solid);
  }

  .map-stats {
    display: none;
  }
}

/* ===========================
   ANÁLISE FINANCEIRA
=========================== */

/* Seção financeira — borda esquerda dourada mais espessa */
.analise-financeira {
  border-left: 3px solid var(--accent);
}

/* Linha com destaque leve (VGV, Custo Total, Lucro) */
.detail-row.analise-destaque {
  background: rgba(184, 146, 74, 0.06);
  margin: 0 -1px;
  /* compensa o border da section */
}

.detail-row.analise-destaque .detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-row.analise-destaque .detail-value {
  font-weight: 600;
  color: var(--accent-light);
}

/* Badge de viabilidade — dentro do título da seção */
.detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.viab-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.viab-badge.viavel {
  background: var(--green-bg);
  color: var(--green-light);
  border: 1px solid rgba(46, 139, 87, 0.4);
}

.viab-badge.atencao {
  background: var(--amber-bg);
  color: var(--amber);
  border: 1px solid rgba(201, 132, 10, 0.4);
}

/* Disclaimer na base da análise financeira */
.analise-disclaimer {
  padding: 8px 14px 12px;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ===========================
   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: 12px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.sun-panel-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

.sun-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.sun-close:hover {
  color: var(--text-primary);
}

.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: 3px;
  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: 10px;
  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: 4px;
  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-ref-title {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--accent);
  margin-bottom: 5px;
  border-top: 1px solid rgba(74, 128, 180, 0.15);
  padding-top: 7px;
}

.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: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.10);
}

.gab-legend-note {
  margin-top: 8px;
  font-size: 9px;
  color: #999;
  border-top: 1px solid rgba(74, 128, 180, 0.12);
  padding-top: 6px;
  line-height: 1.4;
}

/* ── 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: 8px;
  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: 3px;
  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: 10px;
  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 12px 8px;
  border-bottom: 1px solid rgba(74, 128, 180, 0.15);
  background: rgba(74, 128, 180, 0.05);
}

.tp-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #1e2d40;
}

.tp-panel-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.tp-panel-actions {
  display: flex;
  gap: 3px;
}

.tp-toggle-all {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(74, 128, 180, 0.3);
  background: transparent;
  color: var(--accent);
  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: var(--accent-pale);
}

/* ── 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: 3px;
}

.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: 9px;
  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;
  bottom: 80px;
  /* acima da toolbar (~60px de altura + gap) */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(74, 128, 180, 0.3);
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.16);
  z-index: 200;
  min-width: 240px;
  max-width: 280px;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

/* ── Cabeçalho ── */
.ep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(74, 128, 180, 0.15);
  background: rgba(74, 128, 180, 0.05);
}

.ep-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #1e2d40;
}

.ep-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.ep-reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid rgba(74, 128, 180, 0.25);
  background: transparent;
  color: #666;
  font-size: 10.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

.ep-reset-btn:hover {
  background: var(--accent-pale, rgba(74, 128, 180, 0.08));
  border-color: var(--accent, #4a80b4);
  color: var(--accent, #4a80b4);
}

/* ── 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: 8px;
  padding: 5px 12px;
  transition: background 0.12s;
}

.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;
  display: flex;
  align-items: center;
  gap: 0;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.ep-color-input {
  width: 100%;
  height: 26px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
  opacity: 0;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ep-swatch-preview {
  display: block;
  width: 52px;
  height: 26px;
  border-radius: 3px;
  transition: background 0.1s;
  cursor: pointer;
}

/* Clique no preview abre o color picker */
.ep-swatch-wrap:hover .ep-swatch-preview {
  filter: brightness(0.93);
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════════
   MOBILE OPTIMIZATIONS (@media)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --sidebar-w: 100%;
  }

  .header {
    padding: 0 16px;
  }

  /* Simplifica o Header: Mantém apenas o nome TRAMA e o botão de login */
  .header-sub, .header-nav, .header-search {
    display: none !important; 
  }

  .header-title {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .login-btn span {
    display: none;
  }

  .login-btn {
    padding: 10px;
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 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 */
  }

  /* Evitar sobreposição de Toolbars */
  .map-controls-floating {
    top: 74px !important; /* Fica logo abaixo do header */
    bottom: auto !important;
    left: 12px !important;
    right: 12px !important;
    transform: none !important;
    width: auto !important;
    justify-content: space-between;
    padding: 6px 12px;
  }

  .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;
  }

  .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 */
  }

  .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 */
  .sun-panel, .transporte-panel, .estilo-panel {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    bottom: 90px !important;
    transform: none !important;
    border-radius: 20px;
  }

  /* Ajuste no Modal de Boas Vindas */
  .modal-content {
    padding: 24px 20px;
    border-radius: 24px;
    margin: 0 12px;
  }

  .modal-title {
    font-size: 22px;
  }

  .promo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .promo-item {
    padding: 12px;
  }

  .promo-item p {
    font-size: 11px;
  }

  #searchResults {
    max-height: 50vh;
    left: 12px;
    right: 12px;
  }
}

/* ===========================
   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: 540px;
  border-radius: 28px;
  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);
}

.modal-header {
  margin-bottom: 32px;
}

.modal-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  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;
}

.modal-body p {
  color: #4a543b;
  font-size: 15px;
  line-height: 1.6;
}

.promo-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  text-align: left;
}

.promo-item {
  display: flex;
  gap: 16px;
  background: #fdfdfa;
  padding: 16px;
  border-radius: 16px;
  transition: transform 0.2s;
  border: 1px solid var(--border);
}

.promo-item:hover {
  transform: translateX(4px);
  background: #f5f5f0;
}

.p-icon {
  font-size: 20px;
  background: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.promo-item strong {
  display: block;
  font-size: 14px;
  color: #1a2410;
}

.promo-item p {
  font-size: 12.5px;
  color: #747d6a;
  margin: 0;
}

.modal-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  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: 100%;
}

.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: #747d6a;
  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; }
}