:root {
  --ga-primary: #0b5cab;
  --ga-primary-dark: #094a8c;
  --ga-text: #1a1a1a;
  --ga-muted: #64748b;
  --ga-bg: #f5f7fa;
  --ga-surface: #ffffff;
  --ga-border: #e2e8f0;
  --ga-sidebar-width: 200px;
  --ga-font: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ga-font);
  color: var(--ga-text);
  background: var(--ga-bg);
}

[x-cloak] {
  display: none !important;
}

.btn-primary {
  background-color: var(--ga-primary);
  border-color: var(--ga-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ga-primary-dark);
  border-color: var(--ga-primary-dark);
}

/* Auth */
.auth-shell {
  background:
    radial-gradient(circle at top right, rgba(11, 92, 171, 0.12), transparent 40%),
    linear-gradient(180deg, #f8fbff 0%, var(--ga-bg) 100%);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--ga-surface);
  border: 1px solid var(--ga-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.auth-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
}

.auth-logo-candidato {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.auth-footer {
  text-align: center;
  color: var(--ga-muted);
  font-size: 0.8rem;
  max-width: 420px;
}

.auth-footer .footer-logo-sm {
  max-height: 28px;
  width: auto;
  margin-bottom: 0.5rem;
}

/* App shell */
.app-wrapper {
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  width: var(--ga-sidebar-width);
  max-width: var(--ga-sidebar-width);
  box-sizing: border-box;
  background: var(--ga-surface);
  border-right: 1px solid var(--ga-border);
  padding: 1rem 0.85rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1040;
}

.sidebar-brand {
  padding: 0.35rem 0.65rem 1rem;
  border-bottom: 1px solid var(--ga-border);
  margin-bottom: 1rem;
}

.sidebar-logo {
  max-width: 100%;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #0a2f6b;
}

.sidebar-product {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ga-muted);
  letter-spacing: 0.02em;
}

.sidebar-section {
  margin: 1rem 0.65rem 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ga-muted);
  font-weight: 600;
}

.sidebar-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  color: var(--ga-text);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.sidebar-link:hover {
  background: #eef5fc;
  color: var(--ga-primary);
}

.sidebar-link.active {
  background: rgba(11, 92, 171, 0.12);
  color: var(--ga-primary);
}

.sidebar-link-sub {
  padding-left: 1.55rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.sidebar-link-with-action {
  position: relative;
  margin-bottom: 0.2rem;
}

.sidebar-link-with-action .sidebar-link {
  margin-bottom: 0;
  padding-right: 2.1rem;
}

.sidebar-link-with-action.is-active .sidebar-link-add {
  color: var(--ga-primary);
}

.sidebar-link-add {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 7px;
  color: var(--ga-primary);
  text-decoration: none;
  background: transparent;
  z-index: 1;
}

.sidebar-link-add:hover,
.sidebar-link-add.active {
  background: rgba(11, 92, 171, 0.16);
  color: var(--ga-primary);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  height: 64px;
  background: var(--ga-surface);
  border-bottom: 1px solid var(--ga-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-title {
  font-weight: 600;
  flex: 1;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-username {
  font-size: 0.9rem;
  color: var(--ga-muted);
}

.topbar-username-link {
  text-decoration: none;
}

.topbar-username-link:hover {
  color: var(--ga-primary);
  text-decoration: underline;
}

.app-content {
  padding: 1.5rem;
  flex: 1 0 auto;
}

.app-content:has(.apoiador-detail-page) {
  padding-top: 0.35rem;
}

.flash-messages:empty {
  display: none;
  margin: 0 !important;
  padding: 0 !important;
}

.app-footer {
  border-top: 1px solid var(--ga-border);
  background: var(--ga-surface);
  padding: 1rem 1.25rem;
  margin-top: auto;
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-logo {
  max-height: 36px;
  width: auto;
  object-fit: contain;
}

.app-footer-texts {
  font-size: 0.8rem;
  color: var(--ga-muted);
  line-height: 1.35;
}

.app-footer-dev {
  margin-top: 0.15rem;
}

.app-footer-suporte {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  background: #25d366;
  border: 1px solid #1faa52;
  white-space: nowrap;
  transition: filter 0.15s ease;
}

.app-footer-suporte:hover {
  color: #fff;
  filter: brightness(1.06);
}

.app-footer-suporte:focus-visible {
  outline: 2px solid var(--ga-primary);
  outline-offset: 2px;
}

.auth-footer .app-footer-suporte {
  align-self: center;
}

.app-sidebar-backdrop {
  display: none;
}

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

.page-header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
  align-items: center;
}

.page-actions .btn {
  white-space: nowrap;
}

.visao-toggle .btn.active {
  background: var(--ga-primary);
  border-color: var(--ga-primary);
  color: #fff;
}

.btn-novo-apoiador {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
}

.btn-importar-lista {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-exportar-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

.page-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.page-subtitle {
  color: var(--ga-muted);
  margin: 0.35rem 0 0;
}

.stat-card,
.panel {
  background: var(--ga-surface);
  border: 1px solid var(--ga-border);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
}

.stat-card {
  padding: 1.1rem 1.2rem;
}

.stat-label {
  color: var(--ga-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.2rem;
  color: var(--ga-primary);
}

.panel-header,
.panel-footer {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--ga-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.panel-dados-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 1fr);
  grid-template-areas:
    "principal contatos"
    "extras contatos";
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 0.95rem 1.15rem;
}

.panel-dados-extras {
  grid-area: extras;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.apoiador-detail-page {
  margin-top: 0;
}

.apoiador-voltar-link {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1.2;
  color: #94a3b8;
  text-decoration: none;
  margin: 0 0 0.4rem;
}

.apoiador-voltar-link:hover {
  color: var(--ga-primary);
  text-decoration: underline;
}

.panel-dados-principal {
  grid-area: principal;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.panel-dados-nome-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.panel-dados-nome-row .h5 {
  font-weight: 700;
  color: var(--ga-text);
  line-height: 1.25;
}

.panel-dados-editar {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ga-primary);
  text-decoration: none;
}

.panel-dados-editar:hover {
  text-decoration: underline;
}

.panel-dados-local {
  font-size: 0.85rem;
  color: var(--ga-muted);
}

.panel-dados-sublinha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.85rem;
}

.panel-dados-sexo {
  flex: 0 0 auto;
}

.panel-dados-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.panel-dados-contatos {
  grid-area: contatos;
  min-width: 0;
  background: #e8edf3;
  border: 1px solid #d0d7e2;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.panel-dados-contatos-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ga-muted);
  margin-bottom: 0.65rem;
}

.panel-dados-contatos-lista {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.panel-dados .social-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.panel-dados .social-readout .social-field {
  margin: 0;
}

.panel-dados-obs {
  margin-top: 0.35rem;
  color: var(--ga-muted);
  font-size: 0.9rem;
}

@media (max-width: 991.98px) {
  .panel-dados-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "principal"
      "contatos"
      "extras";
  }
}

.panel-footer {
  border-bottom: 0;
  border-top: 1px solid var(--ga-border);
}

.panel-body {
  padding: 1.15rem;
}

.panel-filtros .panel-body {
  padding: 0.65rem 0.85rem;
}

.panel-filtros .form-label-sm {
  font-size: 0.75rem;
  color: var(--ga-muted);
  font-weight: 600;
}

.mapa-panel .panel-footer {
  border-top: 1px solid var(--ga-border);
}

.mapa-stage {
  position: relative;
  width: 100%;
  background: #e8eef5;
}

.mapa-tocantins {
  height: min(78vh, 720px);
  width: 100%;
  background: #eef2f7;
}

.mapa-tocantins .leaflet-container {
  width: 100%;
  height: 100%;
  background: #eef2f7;
}

.mapa-tocantins .mapa-basemap {
  filter: grayscale(1) brightness(1.08) contrast(0.9);
  opacity: 0.65;
}

.mapa-detalhe-card {
  position: absolute;
  top: 4.5rem;
  right: 0.85rem;
  z-index: 500;
  width: min(280px, calc(100% - 1.7rem));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ga-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
  overflow: visible;
}

.mapa-filtros-card {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 500;
  width: min(260px, calc(100% - 1.7rem));
  max-height: calc(100% - 1.7rem);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ga-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mapa-filtros-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ga-muted);
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--ga-border);
  flex: 0 0 auto;
  line-height: 1.2;
}

.mapa-filtros-card-header > span {
  flex: 1 1 auto;
  min-width: 0;
}

.mapa-detalhe-card-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ga-muted);
  padding: 0.55rem 0.75rem 0.35rem;
  border-bottom: 1px solid var(--ga-border);
}

.mapa-filtros-card-header .mapa-filtro-limpar {
  width: auto;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.05rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: none;
  letter-spacing: 0.01em;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  background: #f8fafc;
  color: var(--ga-muted);
}

.mapa-filtros-card-header .mapa-filtro-limpar:hover {
  border-color: #94a3b8;
  color: var(--ga-text);
  background: #fff;
}

.mapa-filtros-card-header .mapa-filtro-limpar.is-active {
  border-color: var(--ga-primary);
  color: var(--ga-primary);
  background: #eff6ff;
}

.mapa-filtros-card-body {
  padding: 0.55rem 0.65rem 0.7rem;
  overflow-y: auto;
}

.mapa-detalhe-card-body {
  position: relative;
  padding: 0.7rem 0.75rem 0.85rem;
}

.mapa-busca-municipio {
  font-size: 0.82rem;
}

.mapa-busca-sugestoes {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  top: calc(0.7rem + 2rem);
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--ga-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.mapa-busca-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.45rem 0.6rem;
  text-align: left;
  cursor: pointer;
  font-size: 0.8rem;
}

.mapa-busca-item:last-child {
  border-bottom: 0;
}

.mapa-busca-item:hover {
  background: #f8fafc;
}

.mapa-busca-item strong {
  font-size: 0.82rem;
}

.mapa-busca-item span {
  font-size: 0.72rem;
}

.mapa-busca-vazio {
  padding: 0.55rem 0.65rem;
}

.mapa-muni-count-wrap {
  background: transparent;
  border: 0;
}

.mapa-muni-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
  border: 2px solid #fff;
  pointer-events: none;
  white-space: nowrap;
  transform-origin: center center;
  will-change: transform;
  transition: opacity 0.12s ease;
}

.mapa-stage .leaflet-top.leaflet-right {
  top: 0.75rem;
  right: 0.85rem;
}

.mapa-filtros,
.mapa-legenda {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.mapa-filtro-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--ga-border);
  background: #fff;
  color: var(--ga-text);
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.mapa-filtro-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.mapa-filtro-btn.is-active {
  border-color: var(--ga-primary);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(11, 92, 171, 0.15);
}

.mapa-filtro-btn.is-dimmed {
  opacity: 0.45;
}

.mapa-filtro-limpar {
  border: 1px dashed #94a3b8;
  background: transparent;
  color: var(--ga-muted);
  border-radius: 0.5rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.mapa-filtro-limpar:hover {
  color: var(--ga-text);
  border-color: #64748b;
}

.mapa-legenda-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ga-muted);
}

.mapa-legenda-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ga-muted);
  font-weight: 600;
}

.badge-status-ativo {
  background: #dcfce7;
  color: #166534;
}

.badge-status-inativo {
  background: #fee2e2;
  color: #991b1b;
}

.timeline-item {
  border-left: 3px solid var(--ga-primary);
  background: #f1f5f9;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.7rem 0.85rem 0.7rem 1rem;
  margin-bottom: 0.75rem;
}

.timeline-item-topo {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.timeline-item-inicio {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.timeline-item-data {
  color: var(--ga-muted);
  font-size: 0.875rem;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
}

.timeline-item-tipo {
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1.15;
  padding: 0.12rem 0.4rem;
  border-radius: 0.25rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-item-autor {
  color: var(--ga-text);
  font-weight: 500;
  font-size: 0.875rem;
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: auto;
  text-align: right;
}

.timeline-pesquisa {
  border-left-color: #7c3aed;
}

.social-card .panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.social-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-card .social-field .form-control {
  padding: 0.3rem 0.55rem;
  font-size: 0.875rem;
  min-height: 2rem;
  line-height: 1.25;
}

a.social-link {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: background 0.15s ease;
}

a.social-link:hover {
  background: #f1f5f9;
  color: var(--ga-primary, #0b5cab);
}

a.social-link:hover .social-icon {
  transform: scale(1.04);
}

a.social-link .social-icon {
  transition: transform 0.15s ease;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  color: #fff;
}

.social-card .social-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
}

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

.social-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af);
}

.social-facebook {
  background: #1877f2;
}

.social-tiktok {
  background: #111111;
}

.social-x {
  background: #0f1419;
}

.telefone-card .panel-header {
  gap: 0.75rem;
}

.telefone-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.telefone-item {
  background: #f8fafc;
  border: 1px solid var(--ga-border);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
}

.telefone-item-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.telefone-numero-wrap {
  flex: 1 1 8rem;
  min-width: 0;
}

.telefone-tipo-wrap {
  flex: 0 1 7.5rem;
  min-width: 6.5rem;
}

.telefone-tipo-wrap .form-select {
  font-size: 0.85rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.telefone-numero-wrap .form-control {
  font-size: 0.9rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.btn-telefone-remove {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  color: #b91c1c;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.btn-telefone-remove:hover {
  background: #fee2e2;
}

.btn-telefone-salvar {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 0.65rem;
  border: 1px solid #86efac;
  background: #16a34a;
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-telefone-salvar:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-telefone-salvar:disabled {
  opacity: 0.7;
  cursor: wait;
}

.telefone-item.is-saved {
  border-color: #86efac;
  box-shadow: 0 0 0 0.12rem rgba(22, 163, 74, 0.2);
}

.telefone-item.is-removing {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.telefone-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  color: #fff;
  background: var(--ga-primary);
}

.telefone-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--ga-muted);
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
  flex: 0 0 auto;
}

@media (max-width: 575.98px) {
  .telefone-item-row {
    flex-wrap: wrap;
  }

  .telefone-numero-wrap {
    flex: 1 1 calc(100% - 3rem);
  }

  .telefone-tipo-wrap {
    flex: 1 1 auto;
  }
}

.status-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.status-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.status-toggle-ui {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 158px;
  height: 38px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease;
  overflow: hidden;
}

.status-toggle.is-inactive .status-toggle-ui {
  background: #dc2626;
}

.status-toggle-text {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
  transition: color 0.2s ease;
}

.status-toggle:not(.is-inactive) .status-toggle-text:first-child {
  color: #166534;
}

.status-toggle.is-inactive .status-toggle-text:last-child {
  color: #991b1b;
}

.status-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
  z-index: 1;
}

.status-toggle.is-inactive .status-toggle-knob {
  transform: translateX(100%);
}

.status-toggle input:focus-visible + .status-toggle-ui {
  outline: 2px solid var(--ga-primary);
  outline-offset: 2px;
}

.panel-header-compact {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.titulo-eleitor-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.titulo-eleitor-field .form-control {
  flex: 1 1 11rem;
  min-width: 0;
}

.js-municipio-regiao.htmx-request {
  opacity: 0.65;
  pointer-events: none;
}

.js-municipio-regiao.is-saved {
  border-color: #16a34a;
  box-shadow: 0 0 0 0.15rem rgba(22, 163, 74, 0.2);
}

.dados-icones {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dado-linha {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}

.dado-linha > span:not(.dado-icon):not(.telefone-acoes):not(.badge-principal),
.dado-linha > a {
  min-width: 0;
  overflow-wrap: anywhere;
}

a.dado-link {
  text-decoration: none;
  color: inherit;
}

a.dado-link:hover {
  color: var(--ga-primary, #0b5cab);
}

.dado-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
  flex: 0 0 auto;
  color: #fff;
}

.dado-sexo-m {
  background: #2563eb;
}

.dado-sexo-f {
  background: #db2777;
}

.dado-sexo-o {
  background: #7c3aed;
}

.dado-email {
  background: #0f766e;
}

.dado-titulo {
  background: #475569;
}

.dado-whatsapp {
  background: #25d366;
}

.dado-celular {
  background: #0b5cab;
}

.dado-fixo {
  background: #64748b;
}

.telefone-linha {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 0;
  min-height: 1.35rem;
  line-height: 1.35;
}

.telefone-numero {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  line-height: 1.35;
}

.telefone-acoes {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 0 auto;
  margin-left: 0.15rem;
}

.tel-acao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  flex: 0 0 auto;
  line-height: 1;
}

a.dado-icon {
  text-decoration: none;
}

.tel-acao svg {
  width: 0.7rem;
  height: 0.7rem;
}

.tel-acao-ligar {
  color: #fff;
  background: #0b5cab;
}

.tel-acao-ligar:hover {
  color: #fff;
  filter: brightness(1.08);
}

.tel-acao-whatsapp {
  color: #fff;
  background: #25d366;
}

.tel-acao-whatsapp:hover {
  color: #fff;
  filter: brightness(1.08);
}

.tel-acao-whatsapp-ligar {
  color: #fff;
  background: #128c7e;
}

.tel-acao-whatsapp-ligar:hover {
  color: #fff;
  filter: brightness(1.08);
}

.badge-principal {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
  padding: 0.15rem 0.3rem;
  border-radius: 0.25rem;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  vertical-align: middle;
  flex: 0 0 auto;
}

.social-readout .social-field {
  margin-bottom: 0.45rem;
}

.social-readout .social-field:last-child {
  margin-bottom: 0;
}

.social-readout .social-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 8px;
}

.social-readout .social-icon svg {
  width: 14px;
  height: 14px;
}

.panel-interacao-compact .form-label-sm {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ga-muted);
}

.apoiador-detail-layout > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

.panel-timeline {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  margin-bottom: 0;
}

.panel-timeline .panel-body {
  flex: 1 1 auto;
}

@media (min-width: 992px) {
  .apoiador-detail-layout {
    min-height: calc(100vh - 12rem);
  }

  .panel-timeline {
    min-height: 100%;
  }
}

.invalid-feedback,
.errorlist {
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .app-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1030;
  }

  .mapa-tocantins {
    height: 440px;
  }

  .mapa-detalhe-card {
    top: 0.55rem;
    right: 0.55rem;
    width: min(220px, calc(100% - 1.1rem));
  }

  .mapa-stage .leaflet-top.leaflet-right {
    top: auto;
    bottom: 0.55rem;
    right: 0.55rem;
  }

  .mapa-filtros-card {
    top: auto;
    bottom: 0.55rem;
    left: 0.55rem;
    width: min(220px, calc(100% - 1.1rem));
    max-height: 42%;
  }
}

/* Questionário — formulário em colunas */
.questionario-perguntas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 992px) {
  .questionario-perguntas-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pergunta-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  padding: 0.75rem 0.85rem;
}

.pergunta-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.pergunta-card-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #64748b;
  text-transform: uppercase;
}

.pergunta-card-delete {
  font-size: 0.8rem;
  color: #94a3b8;
}

.pergunta-card .form-label-sm {
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.pergunta-card textarea.form-control {
  resize: vertical;
  min-height: 4.2rem;
}

/* Dobradinhas — mapa com painel esquerdo */
.mapa-stage-dobradinhas .mapa-detalhe-card {
  top: 0.85rem;
}

.mapa-dobradinhas-sidebar {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 500;
  width: min(320px, calc(100% - 1.7rem));
  max-height: calc(100% - 1.7rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}

.mapa-dobradinhas-sidebar > * {
  pointer-events: auto;
}

.mapa-dobradinhas-filtros,
.mapa-dobradinhas-regioes,
.mapa-dobradinhas-lista-wrap {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--ga-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(6px);
}

.mapa-dobradinhas-filtros {
  padding: 0.65rem 0.75rem 0.75rem;
  flex: 0 0 auto;
}

.mapa-dobradinhas-regioes {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mapa-dobradinhas-regioes-body {
  padding: 0.45rem 0.55rem 0.55rem;
  max-height: 150px;
  overflow-y: auto;
}

.mapa-dobradinhas-lista-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mapa-dobradinhas-lista-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--ga-border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ga-muted);
}

.mapa-dobradinhas-lista {
  overflow-y: auto;
  padding: 0.35rem;
}

.mapa-dobradinha-item {
  display: block;
  padding: 0.5rem 0.55rem;
  border-radius: 0.45rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.mapa-dobradinha-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.mapa-dobradinha-item-nome {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
}

.mapa-dobradinha-item-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--ga-muted);
  margin-top: 0.1rem;
}

.mapa-dobradinha-item-abr {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.25;
}

.abrangencia-lista {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}

.abrangencia-regiao {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: inherit;
}

.abrangencia-regiao--tip {
  cursor: help;
}

.tooltip.abrangencia-tooltip .tooltip-inner {
  max-width: 22rem;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.35;
}

.dobradinha-resumo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.dobradinha-resumo-principal {
  min-width: 0;
}

.dobradinha-resumo-topo {
  margin-bottom: 1rem;
}

.dobradinha-resumo-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--ga-border);
  border-bottom: 1px solid var(--ga-border);
}

.dobradinha-meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ga-muted);
  margin-bottom: 0.2rem;
}

.dobradinha-meta-value {
  display: block;
  font-size: 0.95rem;
  color: var(--ga-text, #0f172a);
  word-break: break-word;
}

.dobradinha-resumo-desc {
  margin-top: 1rem;
  color: var(--ga-muted);
  line-height: 1.5;
}

.dobradinha-abrangencia-card {
  background: #f8fafc;
  border: 1px solid var(--ga-border);
  border-radius: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  height: 100%;
}

.dobradinha-abrangencia-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ga-muted);
  margin-bottom: 0.85rem;
}

.dobradinha-abrangencia-bloco + .dobradinha-abrangencia-bloco {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ga-border);
}

.dobradinha-abrangencia-titulo {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dobradinha-abrangencia-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
  min-height: 1.75rem;
}

.badge-dobradinha-ativa {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
}

.badge-dobradinha-negociacao {
  background: #fffbeb !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}

.badge-dobradinha-encerrada {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}

@media (max-width: 991.98px) {
  .dobradinha-resumo-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .mapa-dobradinhas-sidebar {
    top: auto;
    bottom: 0.55rem;
    left: 0.55rem;
    width: min(300px, calc(100% - 1.1rem));
    max-height: 52%;
  }

  .mapa-stage-dobradinhas .mapa-detalhe-card {
    top: 0.55rem;
    width: min(240px, calc(100% - 1.1rem));
  }
}

/* Perfil do Candidato */
.perfil-candidato-foto-wrap {
  width: 180px;
  max-width: 180px;
  flex: 0 0 180px;
}

.perfil-candidato-card img.perfil-candidato-foto,
.perfil-foto-edit img.perfil-candidato-foto,
.perfil-candidato-foto {
  width: 180px;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f1f5f9;
  display: block;
}

.perfil-candidato-foto--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 700;
  font-size: 1.75rem;
  width: 180px;
  height: 180px;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f1f5f9;
}

.perfil-candidato-bio {
  font-size: 0.92rem;
  color: var(--ga-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.perfil-candidato-contatos {
  background: #e8edf3;
  border-radius: 0.65rem;
  padding: 0.85rem 1rem;
}

.perfil-foto-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.25rem;
}

.perfil-foto-edit-preview {
  flex: 0 0 180px;
  width: 180px;
}

.perfil-foto-edit-upload {
  flex: 1 1 14rem;
  min-width: 0;
}
