/* =====================================================
   4º CPA / SEPM - CSS GERAL UNIFICADO
   Páginas:
   - Index
   - Dashboard / Mapa do Crime
   - Análise Quantitativa
   - Análise Criminal
===================================================== */


/* =====================================================
   RESET GERAL
===================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #ffffff;
  color: #071a3a;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}


/* =====================================================
   VARIÁVEIS VISUAIS
===================================================== */

:root {
  --navy-950: #020b1c;
  --navy-900: #04142f;
  --navy-800: #061a39;
  --navy-700: #071f45;
  --navy-600: #092856;
  --purple-700: #321061;

  --cyan: #00d9ff;
  --cyan-dark: #00bfe8;
  --yellow: #f4cc22;

  --blue: #0050b5;
  --blue-light: #1477c9;
  --blue-card: #0866b4;
  --blue-chart: #2850d6;
  --blue-chart-dark: #0928a8;

  --gray-chart: #98a8bb;
  --green: #168442;
  --green-dark: #0f7f3a;
  --red: #bd1b1f;
  --orange: #d89200;
  --purple: #8c36e6;
  --teal: #157f75;

  --text-main: #071a3a;
  --text-soft: #1f2937;
  --text-muted: rgba(7, 26, 58, 0.68);

  --border-soft: rgba(7, 26, 58, 0.14);
  --border-medium: rgba(7, 26, 58, 0.28);

  --bg-soft: #f3f7ff;
  --bg-light: #f8fbff;
  --bg-map: #e8eef7;
  --bg-chart: #e6e6e6;
  --bg-criminal: #e9eef5;

  --shadow-soft: 0 2px 8px rgba(7, 26, 58, 0.05);
  --shadow-hover: 0 10px 24px rgba(7, 26, 58, 0.12);
  --shadow-dashboard: 0 8px 18px rgba(7, 26, 58, 0.22);
  --shadow-criminal: 0 18px 40px rgba(31, 41, 55, 0.08);

  --gradient-header: linear-gradient(
    115deg,
    #061a39 0%,
    #071f45 45%,
    #092856 70%,
    #341064 100%
  );

  --gradient-card: linear-gradient(
    135deg,
    #041b3e 0%,
    #071f45 48%,
    #321061 100%
  );

  --gradient-button: linear-gradient(90deg, #0797ed 0%, #004bd6 100%);
}


/* =====================================================
   HEADER / MENU PRINCIPAL
===================================================== */

.site-header {
  width: 100%;
  background: var(--gradient-header);
  color: #ffffff;
  position: relative;
  z-index: 1000;
  overflow: hidden;
}

.header-container {
  width: 100%;
  max-width: 1440px;
  min-height: 160px;
  margin: 0 auto;
  padding: 18px clamp(18px, 3vw, 54px);

  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr) auto;
  grid-template-rows: 56px 64px;
  column-gap: clamp(14px, 2vw, 34px);
  align-items: center;
}

.brand-area {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  align-self: start;
  min-width: 0;
}

.brand-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
}

.brand-logo {
  width: 84px;
  min-width: 84px;
  height: auto;
  object-fit: contain;
}

.brand-text {
  padding-top: 8px;
  min-width: 0;
}

.brand-text h1 {
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.08;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #ffffff;
}

.brand-text p {
  margin-top: 9px;
  font-size: clamp(10px, 0.92vw, 13px);
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: #ffffff;
}

.brand-text p span {
  margin: 0 7px;
  color: rgba(255, 255, 255, 0.75);
}

.top-links-area {
  grid-column: 2 / 4;
  grid-row: 1 / 2;
  justify-self: end;
  align-self: start;
  padding-top: 16px;
  max-width: 100%;
  overflow: hidden;
}

.top-links-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.top-links-nav a,
.top-links-nav span {
  font-size: clamp(8px, 0.63vw, 10px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15px;
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
}

.top-links-nav a:hover {
  color: var(--cyan);
}

.main-nav {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  justify-self: start;
  align-self: end;
  padding-bottom: 5px;
  max-width: 100%;
  min-width: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.1vw, 34px);
  flex-wrap: nowrap;
}

.main-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: clamp(10.5px, 0.9vw, 13.5px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12px;
  white-space: nowrap;
  color: #ffffff;
  transition: color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--cyan);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background-color: var(--yellow);
  border-radius: 4px;
  transition: width 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.header-actions {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  justify-self: end;
  align-self: end;

  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 3px;
  white-space: nowrap;
}

.instagram-link {
  width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  color: #ffffff;
  transition: 0.25s ease;
}

.instagram-link:hover {
  color: var(--cyan);
  transform: translateY(-2px);
}

.header-divider {
  width: 1px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.45);
  display: inline-block;
}

.internal-area-btn {
  height: 36px;
  min-width: 128px;
  padding: 0 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background-color: rgba(255, 255, 255, 0.96);
  color: #16264b;

  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2px;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  transition: 0.25s ease;
}

.internal-area-btn i {
  font-size: 12px;
  color: #16264b;
}

.internal-area-btn:hover {
  background-color: #ffffff;
  color: var(--purple-700);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  background: none;
}


/* =====================================================
   CONTEÚDO GERAL
===================================================== */

.main-content {
  width: 100%;
  background-color: #ffffff;
}

.content-container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-marker {
  width: 4px;
  height: 34px;
  background-color: var(--cyan);
  border-radius: 10px;
  display: inline-block;
  flex-shrink: 0;
}

.section-title h2 {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: -0.8px;
}

.section-subtitle {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: clamp(15px, 1.35vw, 21px);
  line-height: 1.4;
  font-weight: 500;
  color: #586579;
}


/* =====================================================
   INDEX - SERVIÇOS E ACESSOS RÁPIDOS
===================================================== */

.quick-services-section {
  width: 100%;
  padding: 34px 0 24px;
  background-color: #ffffff;
}

.services-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 34px;
}

.service-card {
  min-height: 192px;
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  background-color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover,
.service-card-active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-card-header {
  min-height: 64px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(115deg, #041b3e 0%, #062653 52%, #33105e 100%);
  color: #ffffff;
}

.service-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 30px;
}

.service-card-header h3 {
  font-size: clamp(17px, 1.45vw, 23px);
  line-height: 1.08;
  font-weight: 700;
  color: #ffffff;
}

.service-card-body {
  padding: 18px 24px 22px;
}

.service-link {
  min-height: 48px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(7, 26, 58, 0.25);

  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;

  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-main);

  transition: color 0.25s ease, padding-left 0.25s ease;
}

.service-link:last-child {
  border-bottom: none;
}

.service-link i {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.service-link:hover {
  color: #005cc8;
  padding-left: 4px;
}

.service-link:hover i {
  transform: translateX(4px);
}


/* =====================================================
   DASHBOARD / MAPA / QUANTITATIVO / CRIMINAL
===================================================== */

.dashboard-section {
  width: 100%;
  padding: 34px 0 34px;
  background-color: #ffffff;
}

.dashboard-section .content-container {
  max-width: 1480px;
}

.criminal-section {
  background-color: var(--bg-criminal);
}

.criminal-section .content-container {
  max-width: 1500px;
}

.dashboard-kpi-grid {
  width: 100%;
  margin-top: 26px;
  margin-bottom: 24px;

  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.dashboard-kpi-card {
  min-height: 112px;
  padding: 14px 16px;

  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;

  background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue-card) 100%);
  color: #ffffff;

  border-radius: 4px;
  box-shadow: var(--shadow-dashboard);

  overflow: hidden;
  position: relative;
}

.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  top: -42px;
  right: -36px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
}

.kpi-icon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #ffffff;
}

.kpi-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.kpi-content span {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(12px, 0.9vw, 15px);
  line-height: 1.25;
  font-weight: 900;
  color: #ffffff;
}

.kpi-content strong {
  display: block;
  font-size: clamp(25px, 2.35vw, 38px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.dashboard-layout {
  width: 100%;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-filters {
  min-height: 100%;
  padding: 14px;
  background-color: #1477c9;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 14px rgba(7, 26, 58, 0.12);
}

.filter-logo-area {
  width: 100%;
  min-height: 104px;
  margin-bottom: 16px;
  padding: 10px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-logo {
  width: 170px;
  max-height: 92px;
  object-fit: contain;
}

.filter-group {
  margin-bottom: 12px;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 900;
  color: #ffffff;
}

.filter-group select {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-color: #1477c9;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #ffffff 50%),
    linear-gradient(135deg, #ffffff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 14px,
    calc(100% - 10px) 14px;
  background-size:
    8px 8px,
    8px 8px;
  background-repeat: no-repeat;
}

.filter-group select option {
  background-color: #ffffff;
  color: #071a3a;
}

.filter-buttons {
  margin-top: 5px;
  display: grid;
  gap: 9px;
}

.filter-btn,
.filter-link-btn {
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid rgba(7, 26, 58, 0.28);
  background-color: #ffffff;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: 0.25s ease;
}

.filter-btn.active,
.filter-link-btn.active {
  background-color: #171717;
  color: #ffffff;
  border-color: #171717;
}

.filter-btn:hover,
.filter-link-btn:hover {
  filter: brightness(0.94);
}

.update-info {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
  color: #ffffff;
}

.update-info strong,
.update-info span {
  display: block;
}

.dashboard-panels {
  min-width: 0;
}


/* =====================================================
   MAPA DE CALOR DO CRIME
===================================================== */

.crime-heatmap-section {
  width: 100%;
  height: 100%;
}

.heatmap-card {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.crime-heatmap-card {
  height: 100%;
  min-height: 580px;
  display: flex;
  flex-direction: column;
}

.heatmap-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(7, 26, 58, 0.14);
}

.heatmap-header h3 {
  margin-bottom: 5px;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.2;
  font-weight: 900;
  color: var(--text-main);
}

.heatmap-header p {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-muted);
}

.heatmap-badge {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 80, 181, 0.22);
  background-color: #eaf2ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #0050b5;
  white-space: nowrap;
}

.heatmap-image-wrapper,
.crime-map-wrapper {
  width: 100%;
  flex: 1;
  min-height: 500px;
  background-color: var(--bg-map);
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

.crime-heatmap-map {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: var(--bg-map);
  z-index: 1;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.map-status-message {
  position: absolute;
  inset: auto 18px 18px auto;
  z-index: 3;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: rgba(6, 26, 57, 0.9);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.map-status-message.hidden,
.map-loaded .map-status-message {
  display: none;
}


/* =====================================================
   DASHBOARD QUANTITATIVO
===================================================== */

.quantitative-section .dashboard-layout {
  align-items: stretch;
}

.quantitative-panels {
  width: 100%;
  min-width: 0;
  background-color: var(--bg-chart);
  border-radius: 10px;
  border: 1px solid rgba(7, 26, 58, 0.12);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.quantitative-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.quantitative-bottom-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.65fr);
  gap: 18px;
  margin-top: 18px;
  width: 100%;
}

.quant-chart-card {
  min-width: 0;
  min-height: 260px;
  padding: 12px 14px 10px;
  background-color: #e6e6e6;
  border-radius: 6px;
  border: 1px solid rgba(7, 26, 58, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.quant-chart-card::after {
  content: "";
  position: absolute;
  top: 36px;
  right: 8px;
  width: 8px;
  height: 56px;
  border-radius: 4px;
  background: linear-gradient(180deg, #b6b6b6 0%, #f0f0f0 100%);
  opacity: 0.9;
}

.quant-chart-header {
  min-height: 36px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.quant-chart-header h3 {
  font-size: clamp(16px, 1.2vw, 20px);
  line-height: 1.15;
  font-weight: 700;
  color: #081fa5;
  text-align: center;
  letter-spacing: 0.3px;
}

.chart-action-btn {
  width: 28px;
  height: 28px;
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.7);
  color: #081fa5;
  font-size: 12px;
  opacity: 0;
  transform: translateY(-2px);
  transition: 0.2s ease;
}

.quant-chart-card:hover .chart-action-btn,
.criminal-card:hover .chart-action-btn {
  opacity: 1;
  transform: translateY(0);
}

.chart-action-btn:hover {
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(7, 26, 58, 0.15);
}

.quant-chart-body {
  width: 100%;
  min-height: 210px;
  height: 210px;
  position: relative;
  flex: 1;
}

.quant-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

.ranking-police-card,
.history-chart-card {
  min-height: 270px;
}

.ranking-chart-body,
.history-chart-body {
  min-height: 220px;
  height: 220px;
}


/* =====================================================
   ANÁLISE CRIMINAL
===================================================== */

.criminal-panels {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.criminal-top-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 28px;
}

.criminal-middle-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 28px;
}

.criminal-bottom-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 28px;
}

.criminal-wide-section,
.criminal-table-section,
.criminal-comparison-section {
  width: 100%;
}

.criminal-card {
  width: 100%;
  min-width: 0;
  padding: 30px 32px;
  background-color: #ffffff;
  border: 1px solid rgba(7, 26, 58, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow-criminal);
  position: relative;
  overflow: hidden;
}

.criminal-card-header {
  min-height: 38px;
  margin-bottom: 22px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.criminal-card-header h3 {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.15;
  font-weight: 900;
  color: #1f2937;
}

.criminal-card-header span {
  font-size: clamp(15px, 1.25vw, 20px);
  line-height: 1.3;
  font-weight: 500;
  color: #667085;
  text-align: right;
}

.criminal-section-heading {
  margin-bottom: 26px;
}

.criminal-section-heading h3 {
  font-size: clamp(30px, 2.8vw, 38px);
  line-height: 1.1;
  font-weight: 900;
  color: #1f2937;
}

.criminal-section-heading p {
  margin-top: 8px;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.35;
  font-weight: 500;
  color: #586579;
}

.criminal-chart-body {
  width: 100%;
  height: 360px;
  min-height: 300px;
  position: relative;
}

.donut-chart-body {
  height: 360px;
  min-height: 320px;
}

.wide-chart-body {
  height: 430px;
  min-height: 360px;
}

.criminal-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

.criminal-donut-card {
  display: flex;
  flex-direction: column;
}

.criminal-legend {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}

.criminal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(13px, 1.1vw, 18px);
  font-weight: 500;
  color: #344054;
  white-space: nowrap;
}

.legend-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.violent {
  background-color: var(--red);
}

.legend-dot.vehicle {
  background-color: var(--green);
}

.legend-dot.vehicle-theft {
  background-color: var(--blue-chart);
}

.legend-dot.street {
  background-color: var(--orange);
}

.legend-dot.cargo {
  background-color: var(--purple);
}

.legend-dot.collective {
  background-color: var(--teal);
}

.criminal-table-card {
  padding: 30px 30px 24px;
}

.criminal-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
}

.criminal-table-wrapper::-webkit-scrollbar {
  height: 13px;
}

.criminal-table-wrapper::-webkit-scrollbar-track {
  background-color: #f2f4f7;
  border-radius: 999px;
}

.criminal-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #8a8a8a;
  border-radius: 999px;
  border: 2px solid #f2f4f7;
}

.criminal-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  color: #1f2937;
}

.criminal-table thead th {
  padding: 20px 18px;
  background-color: #f6f8fb;
  border-bottom: 1px solid #dde3ec;
  font-size: clamp(15px, 1.35vw, 22px);
  line-height: 1.15;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  color: #344054;
  white-space: nowrap;
}

.criminal-table tbody td {
  padding: 22px 18px;
  border-bottom: 1px solid #dde3ec;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.2;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
}

.criminal-table tbody td:first-child,
.criminal-table thead th:first-child {
  font-weight: 900;
}

.criminal-table tbody tr:hover {
  background-color: #f9fbff;
}

.criminal-table .variation-positive {
  color: var(--red);
  font-weight: 900;
}

.criminal-table .variation-negative {
  color: var(--green);
  font-weight: 900;
}

.criminal-table .variation-neutral {
  color: #667085;
  font-weight: 900;
}


/* =====================================================
   MODAL DE GRÁFICO EXPANDIDO
===================================================== */

.chart-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 7000;
  padding: 24px;
  background-color: rgba(2, 11, 28, 0.86);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.chart-fullscreen-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.chart-fullscreen-content {
  width: min(1180px, 96vw);
  height: min(720px, 86vh);
  padding: 22px;
  background-color: #ffffff;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.chart-fullscreen-content h3 {
  margin-bottom: 14px;
  font-size: 24px;
  color: #081fa5;
  text-align: center;
}

.chart-fullscreen-canvas-wrap {
  width: 100%;
  height: calc(100% - 48px);
  position: relative;
}

.chart-fullscreen-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--navy-800);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: 0.2s ease;
}

.chart-fullscreen-close:hover {
  background-color: var(--blue);
  transform: rotate(90deg);
}


/* =====================================================
   RODAPÉ
===================================================== */

.site-footer {
  width: 100%;
  background: var(--gradient-header);
  color: #ffffff;
}

.footer-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px clamp(20px, 5vw, 72px) 24px;

  display: grid;
  grid-template-columns: 1.65fr repeat(5, 1fr);
  gap: 24px;
  align-items: stretch;
}

.footer-brand,
.footer-column,
.footer-technology {
  min-width: 0;
}

.footer-column,
.footer-technology {
  padding-left: 24px;
  border-left: 1px solid rgba(255, 255, 255, 0.5);
}

.footer-logo-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-logo {
  width: 86px;
  min-width: 86px;
  height: auto;
  object-fit: contain;
}

.footer-brand-text h2 {
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.12;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #ffffff;
}

.footer-brand-text p {
  margin-top: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
}

.footer-brand-text p span {
  margin: 0 6px;
}

.footer-address {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-address i {
  color: var(--cyan);
  font-size: 23px;
  margin-top: 4px;
}

.footer-address p {
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.footer-column h3 {
  margin-bottom: 18px;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-column a {
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.footer-column a:hover {
  color: var(--cyan);
  padding-left: 4px;
}

.footer-technology {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.technology-label {
  font-size: 17px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.88);
}

.footer-technology h3 {
  margin-top: 4px;
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

.developer-label {
  margin-top: 26px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.developer-name {
  margin-top: 7px;
  font-size: 16px;
  color: #ffffff;
}

.footer-bottom {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding: 18px 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.footer-bottom span {
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.65);
}

.keyboard-focus {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}


/* =====================================================
   RESPONSIVIDADE
===================================================== */

@media (min-width: 1600px) {
  .header-container,
  .footer-container {
    max-width: 1500px;
  }

  .dashboard-section .content-container {
    max-width: 1540px;
  }

  .dashboard-kpi-card {
    min-height: 128px;
  }

  .crime-heatmap-card {
    min-height: 660px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 580px;
  }

  .quant-chart-card {
    min-height: 300px;
  }

  .quant-chart-body {
    height: 248px;
  }

  .ranking-chart-body,
  .history-chart-body {
    height: 250px;
  }

  .criminal-chart-body {
    height: 420px;
  }

  .wide-chart-body {
    height: 480px;
  }
}

@media (max-width: 1366px) {
  .header-container {
    max-width: 100%;
    min-height: 150px;
    padding: 16px 24px;
    grid-template-columns: 310px minmax(0, 1fr) auto;
    grid-template-rows: 52px 60px;
    column-gap: 18px;
  }

  .brand-logo {
    width: 76px;
    min-width: 76px;
  }

  .brand-text h1 {
    font-size: 20px;
    letter-spacing: 0.7px;
  }

  .brand-text p {
    font-size: 11.5px;
  }

  .top-links-nav a,
  .top-links-nav span {
    font-size: 8.5px;
  }

  .main-nav ul {
    gap: 18px;
  }

  .main-nav a {
    font-size: 11.2px;
  }

  .internal-area-btn {
    min-width: 118px;
    height: 34px;
    font-size: 9.5px;
    padding: 0 10px;
  }

  .dashboard-section .content-container {
    max-width: 1280px;
  }

  .dashboard-layout {
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .dashboard-kpi-grid {
    gap: 14px;
  }

  .dashboard-kpi-card {
    padding: 12px;
  }

  .kpi-content strong {
    font-size: 30px;
  }

  .filter-btn,
  .filter-link-btn {
    min-height: 44px;
    font-size: 16px;
  }

  .quantitative-panels {
    padding: 14px;
  }

  .quant-chart-card {
    min-height: 235px;
    padding: 10px;
  }

  .quant-chart-body {
    height: 190px;
    min-height: 190px;
  }

  .criminal-card {
    padding: 26px 28px;
  }

  .criminal-chart-body {
    height: 330px;
  }

  .wide-chart-body {
    height: 390px;
  }
}

@media (max-width: 1220px) {
  .header-container {
    min-height: 135px;
    grid-template-columns: 300px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
  }

  .top-links-area {
    display: none;
  }

  .brand-area {
    grid-row: 1 / 2;
  }

  .main-nav {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    align-self: center;
    padding-bottom: 0;
  }

  .main-nav ul {
    gap: 16px;
  }

  .main-nav a {
    font-size: 10.8px;
  }

  .header-actions {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    align-self: center;
    padding-bottom: 0;
    gap: 10px;
  }

  .header-divider {
    height: 32px;
  }

  .internal-area-btn {
    min-width: 112px;
    height: 32px;
    font-size: 9px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-filters {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 12px;
    align-items: end;
  }

  .filter-logo-area {
    grid-row: span 3;
    height: 100%;
    margin-bottom: 0;
    align-items: center;
  }

  .filter-buttons {
    grid-column: 2 / -1;
    grid-template-columns: repeat(5, 1fr);
  }

  .filter-btn,
  .filter-link-btn {
    min-height: 42px;
    font-size: 13px;
  }

  .update-info {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .crime-heatmap-card {
    min-height: 560px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 460px;
  }

  .quantitative-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quantitative-chart-grid .quant-chart-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .quantitative-bottom-grid {
    grid-template-columns: 1fr;
  }

  .criminal-top-grid,
  .criminal-middle-grid,
  .criminal-bottom-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: span 3;
  }

  .footer-column,
  .footer-technology {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 1080px) {
  .site-header {
    overflow: visible;
  }

  .header-container {
    min-height: auto;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
  }

  .brand-area {
    width: calc(100% - 58px);
  }

  .brand-link {
    align-items: center;
    gap: 12px;
  }

  .brand-logo {
    width: 64px;
    min-width: 64px;
  }

  .brand-text {
    padding-top: 0;
  }

  .brand-text h1 {
    font-size: 17px;
    line-height: 1.15;
  }

  .brand-text p {
    font-size: 10.5px;
    margin-top: 6px;
  }

  .top-links-area,
  .main-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .site-header.menu-open .top-links-area,
  .site-header.menu-open .main-nav,
  .site-header.menu-open .header-actions {
    display: flex;
  }

  .site-header.menu-open .top-links-area {
    width: 100%;
    order: 3;
    padding-top: 18px;
  }

  .site-header.menu-open .top-links-nav,
  .site-header.menu-open .top-links-nav ul {
    width: 100%;
  }

  .site-header.menu-open .top-links-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-header.menu-open .top-links-nav span {
    display: none;
  }

  .site-header.menu-open .top-links-nav a {
    font-size: 12px;
  }

  .site-header.menu-open .main-nav {
    width: 100%;
    order: 4;
    padding-top: 18px;
  }

  .site-header.menu-open .main-nav ul {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-header.menu-open .main-nav a {
    font-size: 13px;
  }

  .site-header.menu-open .header-actions {
    width: 100%;
    order: 5;
    justify-content: flex-start;
    padding-top: 18px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-filters {
    grid-template-columns: 1fr 1fr;
  }

  .filter-logo-area {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .filter-logo {
    width: 150px;
  }

  .filter-buttons {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-btn,
  .filter-link-btn {
    font-size: 15px;
  }

  .heatmap-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .heatmap-badge {
    white-space: normal;
  }

  .crime-heatmap-card {
    min-height: 500px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 380px;
  }

  .quantitative-chart-grid {
    grid-template-columns: 1fr;
  }

  .quantitative-chart-grid .quant-chart-card:nth-child(3) {
    grid-column: auto;
  }

  .quantitative-bottom-grid {
    grid-template-columns: 1fr;
  }

  .quant-chart-card {
    min-height: 260px;
  }

  .quant-chart-body,
  .ranking-chart-body,
  .history-chart-body {
    height: 220px;
    min-height: 220px;
  }

  .criminal-card {
    padding: 24px;
    border-radius: 18px;
  }

  .criminal-card-header {
    flex-direction: column;
    gap: 6px;
  }

  .criminal-card-header span {
    text-align: left;
  }

  .criminal-chart-body,
  .donut-chart-body {
    height: 310px;
    min-height: 280px;
  }

  .wide-chart-body {
    height: 340px;
  }

  .criminal-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .content-container {
    padding: 0 22px;
  }

  .quick-services-section,
  .dashboard-section {
    padding: 28px 0 26px;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section-subtitle {
    font-size: 15px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .quantitative-panels {
    padding: 12px;
  }

  .quant-chart-header h3 {
    font-size: 17px;
  }

  .criminal-section-heading h3 {
    font-size: 26px;
  }

  .criminal-section-heading p {
    font-size: 15px;
  }

  .criminal-table thead th,
  .criminal-table tbody td {
    padding: 16px 14px;
    font-size: 15px;
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .header-container {
    padding: 15px 16px;
  }

  .brand-area {
    width: calc(100% - 50px);
  }

  .brand-logo {
    width: 54px;
    min-width: 54px;
  }

  .brand-text h1 {
    font-size: 13.5px;
    letter-spacing: 0.35px;
  }

  .brand-text p {
    font-size: 8.8px;
    letter-spacing: 0.25px;
  }

  .brand-text p span {
    margin: 0 4px;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }

  .content-container {
    padding: 0 16px;
  }

  .section-title {
    gap: 10px;
  }

  .title-marker {
    height: 28px;
  }

  .section-title h2 {
    font-size: 24px;
    letter-spacing: -0.4px;
  }

  .service-card-header {
    min-height: 58px;
    padding: 13px 16px;
    gap: 13px;
  }

  .service-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .service-card-header h3 {
    font-size: 17px;
  }

  .service-card-body {
    padding: 14px 18px 18px;
  }

  .service-link {
    font-size: 14px;
    min-height: 44px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-card {
    min-height: 94px;
  }

  .dashboard-filters {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    grid-template-columns: 1fr;
  }

  .filter-btn,
  .filter-link-btn {
    min-height: 46px;
    font-size: 18px;
  }

  .crime-heatmap-card {
    min-height: 430px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 310px;
  }

  .heatmap-header {
    padding: 16px;
  }

  .heatmap-header h3 {
    font-size: 16px;
  }

  .heatmap-header p {
    font-size: 13px;
  }

  .quantitative-panels {
    padding: 10px;
  }

  .quantitative-chart-grid,
  .quantitative-bottom-grid {
    gap: 12px;
  }

  .quant-chart-card {
    min-height: 240px;
    padding: 10px 8px;
  }

  .quant-chart-body,
  .ranking-chart-body,
  .history-chart-body {
    height: 200px;
    min-height: 200px;
  }

  .chart-action-btn {
    opacity: 1;
    transform: none;
  }

  .criminal-card {
    padding: 20px;
    border-radius: 16px;
  }

  .criminal-card-header h3 {
    font-size: 20px;
  }

  .criminal-card-header span {
    font-size: 14px;
  }

  .criminal-chart-body,
  .donut-chart-body,
  .wide-chart-body {
    height: 260px;
    min-height: 240px;
  }

  .criminal-legend span {
    font-size: 13px;
  }

  .legend-dot {
    width: 14px;
    height: 14px;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-column,
  .footer-technology {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .dashboard-kpi-card {
    grid-template-columns: 38px 1fr;
    min-height: 90px;
  }

  .kpi-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .kpi-content span {
    font-size: 12px;
  }

  .kpi-content strong {
    font-size: 27px;
  }

  .filter-btn,
  .filter-link-btn {
    font-size: 16px;
  }

  .crime-heatmap-card {
    min-height: 390px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 270px;
  }

  .quant-chart-card {
    min-height: 220px;
  }

  .quant-chart-body,
  .ranking-chart-body,
  .history-chart-body {
    height: 180px;
    min-height: 180px;
  }

  .quant-chart-header h3 {
    font-size: 15px;
  }

  .criminal-card {
    padding: 18px;
  }

  .criminal-chart-body,
  .donut-chart-body,
  .wide-chart-body {
    height: 235px;
    min-height: 220px;
  }

  .footer-logo-area {
    align-items: flex-start;
  }

  .footer-logo {
    width: 64px;
    min-width: 64px;
  }

  .footer-brand-text h2 {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .dashboard-kpi-card {
    padding: 11px;
  }

  .kpi-icon {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .kpi-content strong {
    font-size: 24px;
  }

  .filter-group select {
    font-size: 13px;
  }

  .filter-btn,
  .filter-link-btn {
    font-size: 15px;
  }

  .crime-heatmap-card {
    min-height: 360px;
  }

  .heatmap-image-wrapper,
  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 240px;
  }

  .quant-chart-card {
    min-height: 205px;
  }

  .quant-chart-body,
  .ranking-chart-body,
  .history-chart-body {
    height: 165px;
    min-height: 165px;
  }

  .criminal-chart-body,
  .donut-chart-body,
  .wide-chart-body {
    height: 210px;
    min-height: 200px;
  }
}


/* =====================================================
   IMPRESSÃO / PDF
===================================================== */

@media print {
  .site-header,
  .site-footer,
  .mobile-menu-btn,
  .dashboard-filters,
  .leaflet-control-container,
  .chart-action-btn {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .content-container {
    max-width: 100%;
    padding: 0;
  }

  .dashboard-layout,
  .dashboard-kpi-grid,
  .services-grid,
  .criminal-top-grid,
  .criminal-middle-grid,
  .criminal-bottom-grid {
    display: block;
  }

  .dashboard-kpi-card,
  .heatmap-card,
  .service-card,
  .quant-chart-card,
  .criminal-card {
    break-inside: avoid;
    margin-bottom: 14px;
    box-shadow: none;
  }

  .service-card,
  .heatmap-card,
  .quant-chart-card,
  .criminal-card {
    border: 1px solid #888;
  }

  .crime-map-wrapper,
  .crime-heatmap-map {
    min-height: 320px;
  }

  .quantitative-panels,
  .criminal-panels {
    padding: 0;
    border: none;
    background: #ffffff;
  }

  .quantitative-chart-grid,
  .quantitative-bottom-grid {
    display: block;
  }

  .quant-chart-body,
  .ranking-chart-body,
  .history-chart-body,
  .criminal-chart-body {
    height: 260px;
  }

  .criminal-table-wrapper {
    overflow: visible;
  }

  .criminal-table {
    min-width: 100%;
  }
}