/* ==========================================================================
   SISTEMA DE AVALIAÇÃO IMOBILIÁRIA — PLATAFORMA CORPORATIVA (B2B SAAS)
   Conformidade com Edital CAIXA CR 12/2026, BACEN 4.676/2018 e NBR 14.653-2
   Design System Corporativo: Tema Claro Institucional, Limpo e Seguro
   ========================================================================== */

/* ── 1. DESIGN TOKENS & CORES CORPORATIVAS ────────────────────────────── */
:root {
  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;

  /* Superfícies & Fundos (Light Theme Corporativo) */
  --bg-app: #F5F6F8;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F9FAFB;
  --bg-surface-hover: #F3F4F6;
  --bg-surface-active: #E5E7EB;

  /* Bordas Sutis */
  --border-color: #E4E7EC;
  --border-light: #F2F4F7;
  --border-focus: #2563EB;

  /* Tipografia & Hierarquia de Texto */
  --text-primary: #1F2937;
  --text-secondary: #667085;
  --text-tertiary: #98A2B3;
  --text-disabled: #D0D5DD;
  --text-on-primary: #FFFFFF;

  /* Cores Institucionais e Funcionais */
  --brand-navy: #163A5F;        /* Azul institucional banco/engenharia */
  --brand-navy-hover: #0E2742;
  --brand-blue: #2563EB;        /* Azul de ação direta */
  --brand-blue-hover: #1D4ED8;
  --brand-blue-light: #EFF6FF;

  --color-success: #16A34A;     /* Verde de confirmação */
  --color-success-bg: #F0FDF4;
  --color-success-border: #BBF7D0;

  --color-warning: #D97706;     /* Âmbar de aviso */
  --color-warning-bg: #FFFBEB;
  --color-warning-border: #FDE68A;

  --color-danger: #DC2626;      /* Vermelho de erro */
  --color-danger-bg: #FEF2F2;
  --color-danger-border: #FECACA;

  /* Sombras Corporativas Sutis (Sem exagero) */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);

  /* Dimensões & Raios */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --sidebar-width: 260px;
  --header-height: 64px;
}

/* ── 2. RESET & BASE ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ── 3. ESTRUTURA GERAL DO LAYOUT (SIDEBAR + MAIN) ───────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar Fixa à Esquerda */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background-color: var(--brand-navy);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sidebar-nav {
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 0.75rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-item-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-item-btn.active {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue);
  font-weight: 600;
}

.nav-item-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background-color: #E2E8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 0.85rem;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── 4. CONTEÚDO PRINCIPAL (MAIN BODY) ────────────────────────────────── */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header Superior Corporativo */
.app-topbar {
  height: var(--header-height);
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-company-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.topbar-system-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-system-name::before {
  content: '•';
  color: var(--text-tertiary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tenant-select-dropdown {
  display: none;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.tenant-select-dropdown:focus {
  border-color: var(--border-focus);
  outline: none;
}

.btn-icon-subtle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-subtle:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* Área de Conteúdo da Página */
.page-container {
  padding: 2rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ── 5. CARDS & SUPERFÍCIES CORPORATIVAS ──────────────────────────────── */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

/* ── 6. KPI DASHBOARD RESUMO (4 INDICADORES COMPACTOS) ─────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-box-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.kpi-box-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.35rem 0;
  letter-spacing: -0.02em;
}

.kpi-box-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.kpi-box-sub.positive {
  color: var(--color-success);
  font-weight: 500;
}

/* ── 7. TELA PRINCIPAL: NOVA AVALIAÇÃO (DUAS COLUNAS) ─────────────────── */
.valuation-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  align-items: start;
}

/* Seções do Formulário */
.form-section-block {
  margin-bottom: 1.75rem;
}

.form-section-block:last-child {
  margin-bottom: 0;
}

.form-section-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand-navy);
  letter-spacing: 0.03em;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
.col-2  { grid-column: span 2; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  height: 40px;
  padding: 0 0.85rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

.input-with-button {
  display: flex;
  gap: 0.5rem;
}

.input-with-button .form-control {
  flex: 1;
}

/* Botões Corporativos */
.btn-primary {
  height: 42px;
  padding: 0 1.5rem;
  background-color: var(--brand-navy);
  color: var(--text-on-primary);
  border: 1px solid var(--brand-navy);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: var(--brand-navy-hover);
}

.btn-secondary {
  height: 40px;
  padding: 0 1.15rem;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
}

.btn-action-full {
  width: 100%;
  height: 46px;
  font-size: 0.95rem;
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  transition: background-color 0.15s ease;
}

.btn-action-full:hover {
  background-color: var(--brand-blue-hover);
}

/* ── 8. COLUNA DIREITA: RESULTADO DA AVALIAÇÃO ────────────────────────── */
.result-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.result-placeholder {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.result-placeholder-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  color: var(--text-tertiary);
}

/* Bloco do Valor Principal */
.result-highlight-block {
  padding: 1.5rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.result-main-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.result-main-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin: 0.35rem 0 0.2rem;
  letter-spacing: -0.03em;
}

.result-unit-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-blue);
}

/* Barra de Intervalo de Valor (±6%) */
.interval-block {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.interval-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.interval-track {
  height: 6px;
  background-color: #E2E8F0;
  border-radius: 3px;
  position: relative;
  margin-bottom: 0.75rem;
}

.interval-bar {
  position: absolute;
  left: 20%;
  right: 20%;
  height: 100%;
  background-color: var(--brand-navy);
  border-radius: 3px;
}

.interval-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.interval-val-col {
  display: flex;
  flex-direction: column;
}

.interval-val-col span:first-child {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.interval-val-col span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* Mapa Leaflet Integrado */
.result-map-wrapper {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.result-map-container {
  height: 200px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  background-color: #E5E7EB;
}

/* Resumo de Características Técnicas */
.result-details-block {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  font-size: 0.82rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-item-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.detail-item-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Ações de Exportação de Laudo */
.result-actions-block {
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.result-actions-block .btn-primary {
  flex: 1;
}

/* ── 9. TABELAS ENTERPRISE (ORDENS DE SERVIÇO & LAUDOS) ────────────────── */
.table-toolbar {
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-search-input {
  height: 38px;
  padding: 0 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  min-width: 280px;
}

.table-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.table-filter-group {
  display: flex;
  gap: 0.5rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.enterprise-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.enterprise-table th {
  background-color: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.enterprise-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.enterprise-table tbody tr:hover td {
  background-color: var(--bg-surface-hover);
}

/* Badges de Status Sóbrias */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.concluida, .badge-status.homologado {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success-border);
}

.badge-status.pendente, .badge-status.processando {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid var(--color-warning-border);
}

.badge-status.recusada, .badge-status.erro {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid var(--color-danger-border);
}

/* ── 10. MÓDULO DE DOCUMENTOS & OCR DE MATRÍCULAS ─────────────────────── */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--bg-surface-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.upload-dropzone:hover {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue-light);
}

.upload-icon {
  width: 44px;
  height: 44px;
  color: var(--text-secondary);
}

.upload-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 480px;
}

/* ── 11. CONTROLE DE ABAS (VIEWS) ─────────────────────────────────────── */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* ── 12. RESPONSIVIDADE CORPORATIVA ──────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 72px;
  }
  .brand-info, .sidebar-footer .user-info, .nav-section-title, .nav-item-btn span {
    display: none;
  }
  .nav-item-btn {
    justify-content: center;
    padding: 0.75rem;
  }
  .valuation-grid {
    grid-template-columns: 1fr;
  }
  .result-card {
    position: static;
  }
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .app-sidebar {
    display: none;
  }
  .app-main {
    margin-left: 0;
  }
  .page-container {
    padding: 1rem;
  }
  .kpi-row {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .col-8, .col-6, .col-4, .col-3, .col-2 {
    grid-column: span 1;
  }
}

/* ── 13. SEÇÃO ESTATÍSTICA E COMPARÁVEIS NBR 14.653 ──────────────────── */
.charts-comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .charts-comparison-grid {
    grid-template-columns: 1fr;
  }
}

.chart-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 1rem;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.chart-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.dashed {
  border-radius: 2px;
  height: 4px;
  width: 12px;
}

.legend-rect {
  display: inline-block;
  width: 12px;
  height: 8px;
  border-radius: 2px;
}

/* Pins de Imóveis no Mapa Leaflet com Balões de Preço */
.subject-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.subject-pin-marker {
  width: 18px;
  height: 18px;
  background: #0D47A1;
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  animation: pulse-pin 2s infinite;
}

@keyframes pulse-pin {
  0% { box-shadow: 0 0 0 0 rgba(13, 71, 161, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(13, 71, 161, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 71, 161, 0); }
}

.comparable-map-pin {
  cursor: pointer;
  white-space: nowrap;
}

.comparable-price-pill {
  background: #166534;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.comparable-price-pill:hover {
  transform: scale(1.08);
  background: #15803d;
}

.comparable-price-pill::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0;
  border-style: solid;
  border-color: #166534 transparent;
  display: block;
  width: 0;
}

/* Tabela de Comparáveis */
.comparables-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.comparables-table tbody tr:hover {
  background-color: #F8FAFC;
}

.badge-distance {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #EFF6FF;
  color: #1E40AF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #DBEAFE;
}

.badge-price-total {
  font-weight: 700;
  color: #166534;
  font-size: 0.9rem;
}

.badge-price-sqm {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.link-anuncio-portal {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  transition: opacity 0.15s ease;
}

.link-anuncio-portal:hover {
  opacity: 0.85;
}

.badge-portal {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #F8FAFC;
  color: #334155;
  border: 1px solid #CBD5E1;
  width: fit-content;
}

.link-anuncio-acao {
  font-size: 0.72rem;
  color: #0284C7;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}


