.page-container {
  width: calc(100% + 3rem);
  margin: -1.5rem;
  min-height: 100vh;
  background: #f7f7f8;
  font-family: "DM Sans", sans-serif;
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111111;
  padding: 0 1.5rem;
  height: 60px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .topbar {
    padding: 0 3rem;
  }
}

.topbar-brand {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.topbar-brand span {
  color: #e8571a;
}

/* Menu desktop */
.topbar-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .topbar-menu {
    display: none;
  }
}

/* Botões da topbar */
.btn-logout {
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
  background: transparent;
  color: #ffffff;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-logout.btn-secondary {
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #dddddd;
}

.btn-logout.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Hambúrguer */
.topbar-hamburguer {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.topbar-hamburguer span {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.topbar-hamburguer.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar-hamburguer.open span:nth-child(2) {
  opacity: 0;
}

.topbar-hamburguer.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .topbar-hamburguer {
    display: flex;
  }
}

/* Dropdown mobile */
.topbar-dropdown {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  z-index: 49;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.topbar-dropdown.active {
  display: flex;
}

.topbar-dropdown .btn-logout {
  width: 100%;
  text-align: left;
  padding: 0.7rem 1rem;
  border-radius: 8px;
}

/* ── Layout principal ── */
.dashboard-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

@media (max-width: 540px) {
  .dashboard-main {
    padding: 1.25rem 1rem 3rem;
  }
}

.dashboard-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.coluna-denuncias {
  min-width: 0;
}

/* ── Dashboard header ── */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
}

.header-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-buttons {
    width: 100%;
  }

  .header-buttons .btn-exportar,
  .header-buttons .btn-nova {
    flex: 1;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
  }
}

/* ── Botões de ação ── */
.btn-nova {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #e8571a;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}

.btn-nova:hover {
  background: #cf4c17;
}

.btn-nova:active {
  transform: scale(0.97);
}

.btn-exportar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  color: #111111;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border: 1.5px solid #ebebeb;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-exportar:hover {
  background: #fafafa;
  border-color: #c0c0c0;
}

.btn-exportar:active {
  transform: scale(0.97);
}

/* ── Gráficos row ── */
.dashboard-graficos-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .dashboard-graficos-row {
    flex-direction: column;
  }

  .dashboard-graficos-row .grafico-card {
    min-width: 0 !important;
    flex: unset !important;
    width: 100%;
  }
}

/* ── Card do Gráfico ── */
.grafico-card {
  background: #ffffff;
  border: 1.5px solid #ebebeb;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 0;
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

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

.grafico-titulo {
  font-family: "Sora", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.grafico-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

#pizzaCanvas,
#regioesCanvas {
  flex-shrink: 0;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Banner de alerta */
.grafico-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fff8f5;
  border: 1.5px solid #ffded0;
  border-left: 4px solid #e8571a;
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #4a4a4a;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  margin-top: 0.5rem;
}

.grafico-banner strong {
  color: #c04a14;
}

/* Legenda do gráfico */
.grafico-legenda {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  width: 100%;
}

.legenda-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #4a4a4a;
}

.legenda-cor {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legenda-nome {
  color: #333;
}

.legenda-pct {
  font-weight: 700;
  color: #111111;
  margin-left: 0.15rem;
}

/* ── Cards de denúncias ── */
#listaDenuncias {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cardDenuncia {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  border: 1.5px solid #ebebeb;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cardDenuncia:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.card-header-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cardDenuncia h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111111;
  margin: 0;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.badge-tipo {
  background: #fff0e8;
  color: #c04a14;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.2rem;
}

.card-meta span {
  font-size: 0.82rem;
  color: #6b6b6b;
}

.card-meta span strong {
  color: #111111;
  font-weight: 600;
}

.card-descricao {
  font-size: 0.875rem;
  color: #4a4a4a;
  line-height: 1.55;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.card-acoes {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
  padding-top: 0.75rem;
}

@media (max-width: 400px) {
  .card-acoes {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .btn-editar-card,
  .btn-excluir-card {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }
}

.btn-editar-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3b82f6;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-editar-card:hover {
  background: #2563eb;
}

.btn-excluir-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.btn-excluir-card:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.btn-excluir-card:active {
  transform: scale(0.97);
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #9e9e9e;
}

.empty-state p {
  font-size: 0.95rem;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #efefef 25%, #e0e0e0 50%, #efefef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 10px;
  height: 110px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Coluna de números oficiais ── */
.coluna-numeros {
  background: #ffffff;
  border: 1.5px solid #ebebeb;
  border-radius: 16px;
  padding: 1.4rem 1.25rem;
  position: sticky;
  top: 76px;
  transition: box-shadow 0.2s;
}

.coluna-numeros:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

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

.numeros-header h2 {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
}

.btn-adicionar-numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e8571a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.btn-adicionar-numero:hover {
  background: #cf4c17;
}

.btn-adicionar-numero:active {
  transform: scale(0.93);
}

.numeros-subtitulo {
  font-size: 0.78rem;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.45;
}

/* Filtro */
.filtro-numeros-container {
  margin-bottom: 0.9rem;
}

.select-filtro-instituicao {
  width: 100%;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
  background-color: #fafafa;
  border: 1.5px solid #ebebeb;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8571a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
  box-sizing: border-box;
}

.select-filtro-instituicao:hover {
  border-color: #c0c0c0;
  background-color: #ffffff;
}

.select-filtro-instituicao:focus {
  border-color: #e8571a;
  box-shadow: 0 0 0 3px rgba(232, 87, 26, 0.1);
  background-color: #ffffff;
}

/* Tabela de números */
.numeros-table-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #ebebeb;
}

.numeros-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: fixed;
}

.numeros-table thead tr {
  background: #111111;
  color: #ffffff;
}

.numeros-table thead th {
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.numeros-table thead th:first-child {
  width: 42%;
}

.numeros-table thead th:nth-child(2) {
  width: calc(58% - 40px);
}

.numeros-table thead th:last-child {
  width: 40px;
  padding: 0;
}

.numeros-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.numeros-table tbody tr:last-child {
  border-bottom: none;
}

.numeros-table tbody tr:hover {
  background: #fff8f5;
}

.numeros-table tbody td {
  padding: 0.6rem 0.75rem;
  color: #333;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.numeros-table tbody td:first-child {
  font-weight: 600;
  color: #111111;
}

.numeros-table tbody td:nth-child(2) {
  color: #e8571a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.numeros-table tbody td:last-child {
  padding: 0.4rem;
  text-align: center;
  width: 40px;
}

.btn-remover-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.btn-remover-numero:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.numeros-aviso {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  color: #333;
  line-height: 1.5;
  padding: 0.55rem 0.75rem;
  background: #fff8f5;
  border-left: 3px solid #e8571a;
  border-radius: 0 6px 6px 0;
}

.numeros-aviso strong {
  color: #c04a14;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  box-sizing: border-box;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border: 1.5px solid #ebebeb;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  animation: slideUp 0.2s ease;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .modal-content {
    padding: 1.25rem 1rem;
    border-radius: 14px;
    max-height: calc(100dvh - 2rem);
  }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-header h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: transparent;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  color: #6b6b6b;
  font-size: 1.2rem;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.modal-close:hover {
  border-color: #c0c0c0;
  color: #111111;
  background: #f5f5f5;
}

.modal-content label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b6b6b;
  margin-bottom: 0.4rem;
}

.modal-content .input {
  width: 100%;
  background: #fafafa;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  color: #111111;
  outline: none;
  margin-bottom: 1.1rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}

.modal-content .input::placeholder {
  color: #b0b0b0;
}

.modal-content .input:hover {
  border-color: #c0c0c0;
  background: #ffffff;
}

.modal-content .input:focus {
  border-color: #e8571a;
  box-shadow: 0 0 0 3px rgba(232, 87, 26, 0.12);
  background: #ffffff;
}

.select-wrapper {
  position: relative;
}

.modal-msg {
  font-size: 0.85rem;
  border-radius: 8px;
  min-height: 0;
  transition: all 0.2s;
  margin-bottom: 0;
}

.modal-msg:not(:empty) {
  padding: 0.55rem 0.9rem;
  margin-bottom: 1rem;
}

.modal-msg.success:not(:empty) {
  background: #f0faf4;
  color: #1e7a44;
  border: 1px solid #a8ddb9;
}

.modal-msg.error:not(:empty) {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.modal-content .btn-registrar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #e8571a;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.modal-content .btn-registrar:hover {
  background: #cf4c17;
}

.modal-content .btn-registrar:active {
  transform: scale(0.98);
}

/* ── Responsivo: tablet/mobile ── */
@media (max-width: 860px) {
  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .coluna-numeros {
    position: static;
    order: -1;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding: 0 1rem;
  }

  .dashboard-header h1 {
    font-size: 1.2rem;
  }

  .cardDenuncia {
    padding: 1rem 1.1rem;
  }

  .modal-content {
    margin: 0;
  }

  .coluna-numeros {
    padding: 1.1rem 1rem;
  }

  .grafico-card {
    padding: 1rem 1rem;
  }
}