/* ==========================================================================
   ANSR - Relatório Diário de Sinistralidade (Power BI Replica in HTML/CSS)
   Canvas Reference: 1280 x 720 px | Theme: CY24SU06 | Font: Calibri
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
  color: #252423;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Viewport wrapper that scales the 1280x720 canvas like Power BI FitToPage */
.pbi-viewport {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #ffffff;
}

.pbi-canvas {
  position: relative;
  width: 1280px;
  height: 766px;
  background-color: #ffffff;
  box-shadow: none;
  transform-origin: center center;
  overflow: hidden;
}

/* Absolute Visual Container positioning */
.vc {
  position: absolute;
}

/* ==========================================================================
   TOP HEADER BAR (#90B7E1)
   ========================================================================== */
.header-bg {
  left: 0px;
  top: 1px;
  width: 1279px;
  height: 63px;
  background-color: #90B7E1;
  z-index: 1;
}

.header-title {
  left: 270px;
  top: 6px;
  width: 517px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Calibri', sans-serif;
  font-size: 24pt;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  z-index: 11;
  pointer-events: none;
  letter-spacing: 0.1px;
}

.header-title.acum-pos {
  left: 400px;
  width: 477px;
}

/* Acumulado Date Slicer in Top Left of Header */
.acum-slicer-label {
  left: 0px;
  top: 7px;
  width: 135px;
  height: 28px;
  background-color: #90B7E1;
  color: #ffffff;
  font-family: 'Calibri', sans-serif;
  font-size: 11pt;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 16;
}

.acum-slicer-box {
  left: 135px;
  top: 1px;
  width: 248px;
  height: 41px;
  background-color: #90B7E1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  z-index: 15;
}

.acum-date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #90B7E1;
  border: 1px solid rgba(255, 255, 255, 0.85);
  height: 28px;
  padding: 0 4px;
  flex: 1;
}

.acum-date-input {
  width: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-family: 'Calibri', sans-serif;
  font-size: 10pt;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.acum-date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.9;
}

/* Chevron Button: Obter dados em Excel */
.excel-btn-vc {
  left: 832px;
  top: 6px;
  width: 138px;
  height: 52px;
  z-index: 17;
  cursor: pointer;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: #203864;
  font: inherit;
}

.excel-btn-vc.acum-pos {
  left: 883px;
}

.excel-btn-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(32, 56, 100, 0.30));
}

.excel-btn-shape polygon {
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 3;
  transition: fill .15s, stroke .15s;
}

.excel-btn-vc:hover .excel-btn-shape polygon,
.excel-btn-vc:focus-visible .excel-btn-shape polygon {
  fill: #203864;
  stroke: #ffffff;
}

.excel-btn-vc:hover,
.excel-btn-vc:focus-visible {
  color: #ffffff;
  outline: none;
}

.excel-btn-vc:active .excel-btn-shape {
  transform: translateY(1px);
}

.excel-btn-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-left: 12px;
  padding-right: 16px;
  font-family: 'Segoe UI', 'Calibri', sans-serif;
  font-size: 9.5pt;
  font-weight: 700;
  letter-spacing: .1px;
  text-align: left;
  line-height: 1.1;
  pointer-events: none;
}

.excel-btn-ico {
  flex: none;
  width: 19px;
  height: 19px;
}

.excel-btn-vc.a-gerar {
  cursor: progress;
  opacity: .7;
}

/* Top Right Logo & Action Hotspots */
.logo-vc {
  left: 1037px;
  top: 0px;
  width: 243px;
  height: 63px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-vc img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hotspot-ansr {
  left: 1058px;
  top: 2px;
  width: 90px;
  height: 55px;
  z-index: 20;
  cursor: pointer;
}

.hotspot-vz2030 {
  left: 1146px;
  top: 5px;
  width: 120px;
  height: 55px;
  z-index: 20;
  cursor: pointer;
}

/* ==========================================================================
   TOP BOOKMARK NAVIGATOR (Sinistralidade-preliminar)
   pos=(28, 72, 1221x34)
   ========================================================================== */
.top-nav-vc {
  left: 28px;
  top: 71px;
  width: 1221px;
  height: 34px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.top-nav-pill {
  height: 100%;
  border-radius: 15px;
  border: 2.5px solid #12239E;
  background-color: #ffffff;
  color: #12239E;
  font-family: 'Calibri', sans-serif;
  font-size: 11pt;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.12s ease, color 0.12s ease;
  outline: none;
}

.top-nav-pill:hover:not(.active) {
  background-color: #f0f6ff;
}

.top-nav-pill.active {
  background-color: #12239E;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 0 1.5px #12239E;
}

/* ==========================================================================
   VISUAL HEADER / TITLE BAR (ThemeDataColor ColorId=2, Percent=0.6 -> #A0D1FF)
   ========================================================================== */
.v-title {
  width: 100%;
  height: 23px;
  background-color: #A0D1FF;
  color: #252423;
  font-family: 'Calibri', sans-serif;
  font-size: 12pt;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

/* ==========================================================================
   DROPDOWN SLICER (Selecionar dia / Selecionar semana)
   ========================================================================== */
.slicer-vc {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.slicer-body {
  padding: 8px 6px 4px 6px;
  flex: 1;
  display: flex;
  align-items: center;
}

.pbi-select {
  width: 100%;
  height: 32px;
  border: 1px solid #b3b0ad;
  background-color: #ffffff;
  font-family: 'Calibri', sans-serif;
  font-size: 13pt;
  color: #252423;
  padding: 0 8px;
  outline: none;
  cursor: pointer;
}

.pbi-select:focus {
  border-color: #12239E;
}

/* ==========================================================================
   SHAPE MAP & 2x2 MAP BOOKMARK NAVIGATOR
   ========================================================================== */
.map-vc {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.map-svg-wrap {
  flex: 1;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 48px; /* Space for the 2x2 bookmark navigator at bottom */
}

.map-svg {
  width: 100%;
  height: 100%;
}

.map-district-path {
  stroke: #8a8886;
  stroke-width: 0.7px;
  cursor: pointer;
  transition: fill 0.18s ease, opacity 0.15s ease, stroke-width 0.12s ease;
}

.map-district-path:hover {
  stroke: #252423;
  stroke-width: 1.5px;
}

.map-district-path.dimmed {
  opacity: 0.3;
}

.map-district-path.selected {
  stroke: #000000;
  stroke-width: 2px;
}

/* 2x2 Pill Bookmark Navigator at (11, 656, 301x50) */
.map-nav-vc {
  left: 11px;
  top: 656px;
  width: 301px;
  height: 50px;
  z-index: 18;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.map-nav-pill {
  border-radius: 999px;
  border: 1.5px solid #12239e;
  background-color: #ffffff;
  color: #12239e;
  font-family: 'Calibri', sans-serif;
  font-size: 11pt;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  outline: none;
}

.map-nav-pill:hover:not(.active) {
  background-color: #f0f6ff;
}

.map-nav-pill.active {
  background-color: #12239e;
  color: #ffffff;
}

/* ==========================================================================
   PIVOT TABLE (Matrix Visual - AlternatingRowsNew)
   ========================================================================== */
.table-vc {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  overflow: hidden;
}

.table-scroll {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.table-scroll::-webkit-scrollbar {
  width: 5px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #c8c6c4;
  border-radius: 3px;
}

.pbi-matrix {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  table-layout: fixed;
}

.pbi-matrix.font-85 {
  font-size: 8.5pt;
}

.pbi-matrix thead th {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  color: #252423;
  font-weight: 400;
  text-align: center;
  padding: 2px 3px;
  border-bottom: 1.5px solid #252423;
  cursor: pointer;
  z-index: 2;
  line-height: 1.1;
  height: 24px;
}

.pbi-matrix thead th:first-child {
  text-align: left;
  padding-left: 6px;
  width: 34%;
}

.pbi-matrix thead th:hover {
  background-color: #f3f2f1;
}

.pbi-matrix tbody tr {
  height: 18.8px;
  cursor: pointer;
}

.pbi-matrix tbody tr.row-even {
  background-color: #ffffff;
}

.pbi-matrix tbody tr.row-odd {
  background-color: #f3f2f1;
}

.pbi-matrix tbody tr:hover {
  background-color: #e1dfdd !important;
}

.pbi-matrix tbody tr.dimmed {
  opacity: 0.35;
}

.pbi-matrix tbody tr.selected-row {
  outline: 1.5px solid #12239E;
  outline-offset: -1.5px;
}

.pbi-matrix td {
  padding: 1px 5px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.pbi-matrix td:first-child {
  text-align: left;
  padding-left: 12px;
  color: #252423;
}

/* Total Nacional & Hierarchy Group rows */
.pbi-matrix tbody tr.row-total-nacional {
  font-weight: 700;
  background-color: #ffffff !important;
  border-bottom: 1px solid #d2d0ce;
  cursor: default;
}

.pbi-matrix tbody tr.row-total-nacional td:first-child {
  padding-left: 6px;
}

.pbi-matrix tbody tr.row-group-header {
  font-weight: 700;
  background-color: #faf9f8;
  cursor: default;
}

.pbi-matrix tbody tr.row-group-header td:first-child {
  padding-left: 6px;
  color: #252423;
}

/* ==========================================================================
   HORIZONTAL CLUSTERED BAR CHART
   ========================================================================== */
.barchart-vc {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
}

.barchart-legend {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 4px 8px 2px 8px;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  color: #252423;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.barchart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 10px 18px 6px;
  overflow-y: auto;
  position: relative;
}

.bar-row {
  display: flex;
  align-items: center;
  min-height: 22px;
  flex: 1;
  cursor: pointer;
  padding: 1px 0;
}

.bar-row.dimmed {
  opacity: 0.3;
}

.bar-label {
  width: 92px;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  color: #605e5c;
  text-align: right;
  padding-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.bar-track-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  height: 100%;
  border-left: 1px solid #d2d0ce;
  position: relative;
}

.bar-item {
  height: 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 3px;
  font-family: 'Calibri', sans-serif;
  font-size: 8pt;
  color: #ffffff;
  border-radius: 0 1px 1px 0;
  transition: width 0.2s ease;
  min-width: 0;
  overflow: hidden;
}

.bar-item.vm-bar {
  background-color: #D64550;
}

.bar-item.fg-bar {
  background-color: #118DFF;
}

.barchart-axis {
  display: flex;
  margin-left: 92px;
  border-top: 1px dashed #e1dfdd;
  padding-top: 2px;
  justify-content: space-between;
  font-family: 'Calibri', sans-serif;
  font-size: 8.5pt;
  color: #605e5c;
}

/* ==========================================================================
   ACUMULADO & PERÍODO 1 ANO SPECIFIC ELEMENTS
   ========================================================================== */
.acum-title-card {
  left: 443px;
  top: 106px;
  width: 402px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Calibri', sans-serif;
  font-size: 14pt;
  font-weight: 700;
  color: #12239E;
  text-align: center;
  z-index: 15;
}

.acum-medias-card {
  left: 582px;
  top: 676px;
  width: 354px;
  height: 36px;
  border: 1px solid #12239e;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Calibri', sans-serif;
  font-size: 11pt;
  font-weight: 700;
  color: #12239E;
  white-space: pre;
  z-index: 13;
}

.footnote-acum {
  left: 15px;
  top: 674px;
  width: 472px;
  height: 46px;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  color: #000000;
  line-height: 1.2;
  display: flex;
  align-items: center;
  z-index: 9;
}

.footnote-1ano {
  left: 122px;
  top: 692px;
  width: 841px;
  height: 28px;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  color: #000000;
  display: flex;
  align-items: center;
  z-index: 8;
}

/* Período 1 Ano Date Sub-header Groups above each table */
.p1ano-date-group {
  height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  text-align: center;
  font-family: 'Calibri', sans-serif;
  font-size: 8.5pt;
  color: #12239E;
  line-height: 1.05;
  z-index: 14;
  pointer-events: none;
}

.p1ano-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   FONTE E CONCEITOS TEXT BOXES
   ========================================================================== */
.conceitos-box {
  font-family: 'Calibri', sans-serif;
  font-size: 11pt;
  color: #252423;
  line-height: 1.32;
  padding: 4px 6px;
}

.conceitos-box h3 {
  font-family: 'Calibri', sans-serif;
  font-size: 16pt;
  font-weight: 700;
  color: #12239e;
  margin-bottom: 12px;
}

.conceitos-box p {
  margin-bottom: 10px;
}

/* ==========================================================================
   FOOTER COPYRIGHT & FLOATING TOOLTIP
   ========================================================================== */
/* Nota de revisão por baixo do relatório (igual à dos painéis 24h e 30D) */
.aviso{left:16px;top:728px;width:1248px;height:30px;display:flex;align-items:center;gap:10px;padding:0 14px;background:#F4F8FD;border:1px solid #DCE8F6;border-left:4px solid #203864;border-radius:6px;font-family:'Segoe UI','Calibri',sans-serif;font-size:12.5px;color:#605E5C}
.aviso .ic{flex:none;width:17px;height:17px;border-radius:50%;background:#203864;color:#fff;font:700 11px/17px Georgia,serif;font-style:italic;text-align:center}
.aviso b{color:#252423;font-weight:600}

.copyright-vc {
  left: 1066px;
  top: 692px;
  width: 200px;
  height: 28px;
  font-family: 'Calibri', sans-serif;
  font-size: 9pt;
  font-weight: 700;
  color: #252423;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  z-index: 19;
  pointer-events: none;
}

.pbi-tooltip {
  position: fixed;
  pointer-events: none;
  background-color: rgba(37, 36, 35, 0.95);
  color: #ffffff;
  font-family: 'Calibri', sans-serif;
  font-size: 9.5pt;
  padding: 8px 10px;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  display: none;
  min-width: 165px;
}

.pbi-tooltip-title {
  font-weight: 700;
  font-size: 10pt;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 4px;
  margin-bottom: 5px;
}

.pbi-tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  line-height: 1.35;
}

.pbi-tooltip-val {
  font-weight: 700;
}

/* ==========================================================================
   POWER BI BOTTOM STATUS BAR (Imitates Publish-to-Web Bar)
   ========================================================================== */
.pbi-statusbar {
  width: 100%;
  height: 30px;
  background-color: #eaeaea;
  border-top: 1px solid #d2d0ce;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: 'Segoe UI', 'Calibri', sans-serif;
  font-size: 9pt;
  color: #605e5c;
  flex-shrink: 0;
}

.pbi-statusbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pbi-statusbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #323130;
  font-family: inherit;
  font-size: 8.5pt;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-btn:hover {
  background-color: #dcdcdc;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5pt;
  color: #107c41;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #107c41;
}
