:root {
  --cor-primaria: #003152;
  --cor-secundaria: #00aa9b;
  --cor-hover: #18c7b5;
  --cor-borda: #dcdcdc;
  --cor-texto: #444;
  --cor-fundo: #ffffff;
  --cor-fundo-card: #f7f8fa;
  --sombra: 0 8px 25px rgba(0, 0, 0, 0.1);
  --radius: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f5f7fa;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--cor-texto);
}

/* ===========================
   CONTAINER
=========================== */

.mb-container {
  width: min(1400px, 95%);
  margin: 40px auto;
  display: flex;
  gap: 30px;
  align-items: stretch;
}

/* ===========================
   MAPA
=========================== */

.mb-mapa-container {
  flex: 1;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  padding: 25px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#mapa-svg,
#fluxo-svg {
  width: 100%;
  min-height: 650px;
}

/* ===========================
   PAINEL
=========================== */

.mb-painel {
  width: 430px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--sombra);
  display: flex;
  overflow: hidden;
}

.mb-painel-conteudo {
  width: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fade 0.35s;
}

.mb-painel h2 {
  color: var(--cor-primaria);
  font-size: 30px;
}

.mb-painel p {
  line-height: 1.7;
}

.mb-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===========================
   LINHAS
=========================== */

.linha {
  border: 1px solid var(--cor-borda);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.linha strong {
  color: var(--cor-primaria);
}

.linha span {
  color: #666;
}

/* ===========================
   CARDS DOS TOTAIS
=========================== */

.mb-resumo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mb-card {
  background: var(--cor-fundo-card);
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.mb-card .titulo {
  display: block;
  font-size: 12px;
  color: #777;
}

.mb-card .valor {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: bold;
  color: var(--cor-primaria);
}

/* ===========================
   TABELAS
=========================== */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th {
  background: var(--cor-primaria);
  color: #002952;
  padding: 10px;
}

table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

table tr:nth-child(even) {
  background: #f5f5f5;
}

.mb-estados {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Barra de rolagem */

.mb-estados::-webkit-scrollbar {
  width: 8px;
}

.mb-estados::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 5px;
}

.mb-estados::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ===========================
   LEGENDA
=========================== */

.mb-legenda {
  border: 1px solid var(--cor-borda);
  border-radius: 10px;
  padding: 18px;
  background: #fafafa;
  font-size: 13px;
  line-height: 1.8;
}

.mb-legenda strong {
  color: var(--cor-primaria);
}

/* ===========================
   MOBILE
=========================== */

.mb-mobile {
  display: none;
}

/* Accordion */

.mb-accordion {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: var(--sombra);
}

.mb-titulo {
  background: var(--cor-primaria);
  color: #fff;
  padding: 18px 22px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: 600;
}

.mb-titulo:hover {
  background: var(--cor-secundaria);
}

.mb-conteudo {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
  padding: 0 20px;
}

.mb-conteudo.ativo {
  max-height: 900px;
  padding: 20px;
}

.mb-tabela {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.mb-tabela th {
  background: var(--cor-primaria);
  color: #fff;
}

.mb-tabela td,
.mb-tabela th {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.mb-tabela tr:nth-child(even) {
  background: #f5f5f5;
}

.mb-totais {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.mb-totais div {
  background: #f3f3f3;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-weight: bold;
}

/* ===========================
   ANIMAÇÃO
=========================== */

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   RESPONSIVO
=========================== */

@media (max-width: 960px) {
  .mb-container {
    display: block;
  }

  .mb-mapa-container,
  .mb-painel {
    display: none;
  }

  .mb-mobile {
    display: block;
    width: min(96%, 700px);
    margin: 30px auto;
  }
}
