:root {
  --azul: #002E6E;
  --azul-sub: #00255a;
  --cinza-txt: #4C4C4C;
  --cinza-med: #A0A0A0;
  --fundo: #F5F6F7;
  --azul2: #007BD3;
  --laranja: #FF7D00;
  --verde: #067506;
  --amarelo: #FFD000;
  --vermelho: #DC3545;
  --branco: #FFFFFF;
  --disp: 'Montserrat', sans-serif;
  --body: 'Inter', sans-serif;
  --sh: 0 1px 3px rgba(0,46,110,.08), 0 4px 14px rgba(0,46,110,.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--body);
  background: var(--fundo);
  color: var(--cinza-txt);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--disp);
  color: var(--azul);
  font-weight: 700;
}

/* Modal de Login DNIT */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 46, 110, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  background: var(--branco);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-login {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-header h2 {
  font-size: 1.5rem;
  color: var(--azul);
  margin-bottom: 0.25rem;
}

.login-header p {
  color: var(--cinza-med);
  font-size: 0.85rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--azul);
  margin-bottom: 0.4rem;
}

.form-control, .dnit-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #dde2e8;
  border-radius: 6px;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--azul);
  background: #fff;
}

.form-control:focus, .dnit-input:focus {
  outline: none;
  border-color: var(--azul2);
  box-shadow: 0 0 0 3px rgba(0, 123, 211, 0.15);
}

.btn-dnit-primary {
  background: var(--azul);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-dnit-primary:hover {
  background: #001f4c;
}

/* Header Institucional DNIT (#002E6E) */
header {
  background: var(--azul);
  color: #fff;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-img {
  height: 44px;
  width: auto;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  padding-right: 14px;
}

.logo-login-img {
  height: 52px;
  width: auto;
}

.minist {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  line-height: 1.3;
}

header h1 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.upd-user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-logout:hover {
  background: var(--vermelho);
}

/* Navegação por Abas (#00255a) */
nav {
  background: var(--azul-sub);
  display: flex;
  padding: 0 28px;
  flex-shrink: 0;
}

.nav-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  padding: 12px 26px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--amarelo);
}

.nav-tab:hover {
  color: #fff;
}

/* Filtros Globais */
.filtros {
  background: #fff;
  border-bottom: 1px solid #e7eaee;
  padding: 10px 28px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

.fl {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fl label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--cinza-med);
  font-weight: 700;
}

.fl select, .input-fl {
  border: 1px solid #dde2e8;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--body);
  font-size: 12px;
  color: var(--azul);
  font-weight: 600;
  background: #fff;
}

.fl-reset {
  margin-left: auto;
  background: var(--fundo);
  border: 1px solid #dde2e8;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cinza-txt);
  cursor: pointer;
}

.fl-export {
  background: var(--azul);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

/* Área Principal */
main {
  flex: 1;
  overflow-y: auto;
  padding: 18px 28px;
}

.page { display: none; }
.page.active { display: block; }

/* Grid de Visão Geral (3 Colunas Finais) */
.vg-grid {
  display: grid;
  grid-template-columns: 230px 1fr 240px;
  gap: 18px;
  align-items: start;
}

.grupo-lab {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cinza-med);
  font-weight: 700;
  margin-bottom: 8px;
}

.vg-kpis-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--sh);
  padding: 14px 16px;
  border-left: 5px solid var(--azul2);
  text-align: center;
}

.kpi.amarelo { border-left-color: var(--amarelo); }
.kpi.verde { border-left-color: var(--verde); }
.kpi.vermelho { border-left-color: var(--vermelho); }
.kpi.azul { border-left-color: var(--azul2); }
.kpi.cinza { border-left-color: var(--cinza-med); }

.kpi .lab {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cinza-med);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.kpi .val {
  font-family: var(--disp);
  font-size: 30px;
  font-weight: 800;
  color: var(--azul);
  margin: 4px 0 2px;
}

.kpi .sub {
  font-size: 10.5px;
  color: var(--cinza-med);
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--sh);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.margin-top-card {
  margin-top: 18px;
}

.card h3 {
  font-size: 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#mapa-vg, #mapa-cad {
  height: 380px;
  border-radius: 8px;
  width: 100%;
}

.legenda {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 600;
}

.legenda span { display: flex; align-items: center; gap: 6px; }
.legenda i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

.table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
}

.dnit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.dnit-table th, .dnit-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #eef1f4;
}

.dnit-table th {
  background: #f8fafc;
  color: var(--cinza-med);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.dnit-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.dnit-table tbody tr:hover {
  background: #f0f4f9;
}

.dnit-table tbody tr.row-selected {
  background: #e0f2fe !important;
  box-shadow: inset 4px 0 0 #0284c7;
}


.badge-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-triagem { background: #fff8e1; color: #b78103; border: 1px solid #ffe082; }
.badge-aprovada { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-atendimento { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.badge-concluida { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }

.side-card h4 {
  font-size: 13.5px;
  margin-bottom: 8px;
}

.text-muted-sm {
  font-size: 11.5px;
  color: var(--cinza-med);
  margin-bottom: 14px;
  line-height: 1.4;
}

.selected-box {
  background: var(--fundo);
  border: 1px dashed #dde2e8;
  padding: 12px;
  border-radius: 6px;
  font-size: 11.5px;
  margin-bottom: 16px;
  text-align: center;
  line-height: 1.5;
  color: var(--azul);
}

.btn-action {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.btn-aprov { background: var(--verde); color: #fff; }
.btn-rejeit { background: var(--vermelho); color: #fff; }
.btn-atend { background: var(--azul2); color: #fff; }
.btn-conc { background: var(--cinza-med); color: #fff; }

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Grid de Cadastro Linear SNV */
#novoCadTab.page.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: calc(100vh - 140px);
  max-height: calc(100vh - 140px);
  overflow: hidden;
}

.cad-grid {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 18px;
  flex: 1;
  height: 100%;
  min-height: 0;
}

#novoCadTab .form-card,
#novoCadTab .map-preview-card {
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#novoCadTab .form-card {
  overflow-y: auto;
}

#novoCadTab #cadastrolinearForm {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

#novoCadTab #mapa-cad {
  flex: 1;
  width: 100%;
  height: 100% !important;
  min-height: 350px;
  border-radius: 6px;
  border: 1px solid #c8d3df;
}

.form-row { display: flex; gap: 14px; }
.form-group.col { flex: 1; }
.input-tip { font-size: 10.5px; color: var(--cinza-med); margin-top: 4px; display: block; }

/* Modal de Detalhes & Galeria de Fotos Survey123 */
.detail-card {
  background: var(--branco);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-header {
  background: var(--azul);
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-header h3 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 2px;
}

.detail-header p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 11.5px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.8;
}

.btn-close-modal:hover {
  opacity: 1;
}

.detail-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--fundo);
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  border: 1px solid #e2e8f0;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--cinza-med);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.info-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--azul);
}

.detail-section {
  margin-bottom: 18px;
}

.detail-section h4 {
  font-size: 13px;
  color: var(--azul);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.desc-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
}

.fotos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.foto-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #f8fafc;
  text-align: center;
  transition: transform 0.2s;
}

.foto-item:hover {
  transform: scale(1.02);
}

.foto-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  cursor: pointer;
}

.foto-caption {
  font-size: 10.5px;
  color: var(--cinza-med);
  padding: 6px;
  background: #fff;
}

.detail-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.detail-footer .btn-action {
  width: auto;
  padding: 10px 20px;
  margin-bottom: 0;
}

/* Modal de Fotos (Idêntico ao Painel de Emergências Executivo :8000) */
.photo-modal-overlay, #photo-modal {
  display: none;
  position: fixed;
  z-index: 9999999 !important;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: rgba(0, 46, 110, 0.92) !important;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  user-select: none;
}

.modal-content-wrapper {
  position: relative;
  max-width: 85%;
  max-height: 85%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  display: block;
  margin: auto;
}

.modal-caption {
  margin-top: 15px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 44px;
  font-weight: 300;
  cursor: pointer;
  transition: 0.3s;
  z-index: 100001;
  line-height: 1;
}

.modal-close:hover {
  color: var(--amarelo);
  transform: scale(1.15);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 48px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: 0.3s;
  padding: 16px 20px;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50%;
}

.modal-nav:hover {
  color: var(--amarelo);
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev { left: 30px; }
.modal-next { right: 30px; }

/* Galeria de Fotos - Miniaturas */
.fotos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.foto-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  background: #fff;
  text-align: center;
  cursor: pointer !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.foto-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 46, 110, 0.18);
  border-color: var(--azul);
}

.foto-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  cursor: pointer !important;
}

.foto-caption {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  padding: 6px 8px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Estilização Institucional do Seletor de Camadas (Vetorial vs Satélite) */
.leaflet-control-layers {
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(0, 46, 110, 0.15) !important;
  border: 1px solid rgba(0, 46, 110, 0.15) !important;
  font-family: var(--body) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--azul) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(4px) !important;
  padding: 6px 12px !important;
}

.leaflet-control-layers-expanded {
  padding: 8px 14px !important;
}

.leaflet-control-layers label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  margin-bottom: 4px !important;
}

/* Estilos para Sub-abas de Cadastro Pontual */
.btn-subtab {
  transition: all 0.2s ease-in-out;
}

.btn-subtab:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Layout Tela Cheia (Full Height) para Cadastro Pontual */
#novoPontualTab.active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#novoPontualTab #modo-pontual-mapa {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 18px;
  flex: 1;
  height: 100%;
}

#novoPontualTab .form-card,
#novoPontualTab .map-preview-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#novoPontualTab #formNovoPontual {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#novoPontualTab #mapa-pontual {
  flex: 1;
  width: 100%;
  height: 100% !important;
  min-height: 450px;
  border-radius: 8px;
  border: 1px solid #c8d3df;
}

/* ── Estilos do Card de Contratos SNV e Auditoria no Modal de Validação ── */
.contratos-section-box {
  grid-column: span 2;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  margin-top: 4px;
}

.contratos-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.contratos-section-header h5 {
  font-size: 13px;
  font-weight: 700;
  color: #002E6E;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.contratos-checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.contrato-check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contrato-check-card:hover {
  border-color: #FF7300;
  background: #fffbf5;
}

.contrato-check-card.selected {
  border-color: #FF7300;
  background: #fff8f0;
  box-shadow: 0 2px 6px rgba(255, 115, 0, 0.12);
}

.contrato-check-card input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #FF7300;
  cursor: pointer;
}

.contrato-card-info {
  flex: 1;
}

.c-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.c-contrato-num {
  font-size: 13px;
  font-weight: 700;
  color: #002E6E;
}

.c-badge-dist {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.c-badge-dist.dist-exact {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.c-badge-dist.dist-near {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.c-empresa-txt {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
}

.c-trecho-txt {
  font-size: 11px;
  color: #64748b;
}

.auditoria-history-card {
  margin-top: 10px;
  padding: 10px;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.auditoria-log-item {
  font-size: 11px;
  color: #334155;
  padding: 6px 0;
  border-bottom: 1px dashed #cbd5e1;
}
.auditoria-log-item:last-child {
  border-bottom: none;
}

/* Botões de Filtro de Visibilidade no Mapa */
.btn-vis-filtro {
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-vis-filtro:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.btn-vis-filtro.active {
  background: #002E6E;
  color: #ffffff;
  border-color: #002E6E;
  box-shadow: 0 1px 3px rgba(0,46,110,0.25);
}

.btn-toggle-eye {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12.5px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-toggle-eye:hover {
  background: rgba(0, 46, 110, 0.08);
  transform: scale(1.1);
}

/* ── Card de Vinculação ao Ponto Mestre (Vistorias) ── */
.origem-section-box {
  background: #faf5ff;
  border: 1.5px solid #d8b4fe;
  border-radius: 8px;
  padding: 12px;
  margin-top: 0;
  transition: all 0.2s ease;
}

.origem-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e9d5ff;
}

.origem-section-header h5 {
  font-size: 12.5px;
  font-weight: 700;
  color: #581c87;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.btn-raio-origem {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-raio-origem.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}

.origem-ponto-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-left: 6px solid #7c3aed;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.origem-ponto-card:hover {
  border-color: #7c3aed;
  background: #faf5ff;
  transform: translateY(-1px);
}

.origem-ponto-card.selected {
  border-color: #7c3aed;
  background: #f3e8ff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.18);
}

/* ── Estilos de Ordenação de Colunas e Paginação do Histórico ── */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

th.sortable:hover {
  background: #001f4d !important;
  color: #ffd000 !important;
}

th.sortable .sort-icon {
  font-size: 10.5px;
  margin-left: 4px;
  opacity: 0.55;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

th.sortable.sort-asc, th.sortable.sort-desc {
  background: #002255 !important;
  color: #ffd000 !important;
}

th.sortable.sort-asc .sort-icon, th.sortable.sort-desc .sort-icon {
  opacity: 1;
  color: #ffd000;
}

.snv-tags-cell {
  max-width: 260px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.snv-tag-small {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

.btn-page {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-page:hover:not(:disabled) {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}

.btn-page.active {
  background: #002e6e;
  color: #fff;
  border-color: #002e6e;
}

