@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playwrite+IN:wght@100..400&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Smooch+Sans:wght@100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4.5rem;
  --body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: rgba(25, 25, 79, 1);
  --title-color: hsl(0, 0%, 0%);
  --text-color: hsl(230, 12%, 40%);
  --body-color: hsl(230, 100%, 98%);
  --container-color: hsl(230, 100%, 97%);
  --border-color: hsl(230, 25%, 80%);
  --nav-color: hsl(0, 0%, 100%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
  --z-modal: 1000;
}

* {
  margin: 0;
  padding: 0;

}


body {
  font-family: var(--body-font);
  scrollbar-width: none;
}

a {
  color: var(--title-color);
  text-decoration: none;
}

.stat-box .texto {
  font-size: 30px;
  font-weight: bold;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
  padding: 0 2rem;
  background-color: var(--nav-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  height: 55px;
}


main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(60vh - var(--header-height) - 50px); /* footer */
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav__link {
  font-size: var(--font-semi-bold);
  color: var(--title-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
  font-weight: bold;
}

.nav__link:hover {
  background-color: var(--first-color);
  color: #fff;
}

.nav__link--sair {
  gap: 8px;
  background-color: #e63946;
  /* vermelho */
  color: #fff;
  /* texto branco */
  text-decoration: none;
  border-radius: 16px;
  font-weight: bold;
  transition: background 0.3s ease;
}


.nav__link--sair:hover {
  background-color: #d62828;
  /* vermelho mais escuro no hover */
}

/* Link ativo (página atual) */


.nav__logo img {
  height: 30px;
  width: auto;
  margin-left: -20px;
}

.nav__logo {
  display: flex;
  margin-left: 45px;
  justify-content: center;
}

.nav_logo p {
  margin-left: 100px;
}

.nav__logo-text {
  margin-left: 15px;
  font-size: 13px;
  font-weight: bold;
}

/*MAPA */

.content-mapa {
  display: flex;
  flex: 1;
   min-height: 70vh; /* altura mínima */
  height: auto;

}

/*.info {
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}

.title h2 {
  margin: 0;
}*/

/*.info-content {
  width: 100%;
  height: 100px;
}
*/
.info {
  background: #fff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* fixa o comportamento */
  gap: 20px;

  position: fixed;
  bottom: 60px;
  /* evita conflito com o footer */
  left: 50%;
  transform: translateX(-50%);

  max-width: 800px;
  /* evita esticar além da conta */
  width: 100%;
}

.info>* {
  flex: 0 0 auto;
  /* não cresce, não encolhe */
}

.title h2 {
  margin: 0;
  font-size: 20px;
  color: #000;
}

.title p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #555;
}

.legend {
  text-align: left;
  font-size: 14px;
  color: #000;
}

.legend .dot {
  display: inline-block;
  width: 10px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px 0 10px;
  vertical-align: middle;
}

.legend .brown {
  background-color: brown;
}

.legend .blue {
  background-color: blue;
}

.legend .gray {
  background-color: lightgray;
}

.legend .green {
  background-color: limegreen;
}

.legend .yellow {
  background-color: gold;
}

.legend .red {
  background-color: red;
}

.container {
  display: flex;
}


/*footer {
  background-color: rgba(25, 25, 79, 1); 
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  margin: 0;
  bottom: 0;
  left: 0;
  width: auto;
}*/


.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  text-align: center;
}

.custom-modal .modal-content {
  background: #1d2551;
  border: solid 7px;
  border-color: blue;
  color: #000000;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 800px;
  max-width: 95%;
  position: relative;
  font-family: Arial, sans-serif;
}

.custom-modal .modal-content h2 {
  margin-top: 0;
  padding: 10px;
  border-radius: 8px;
  text-align: center;

  font-weight: 4px;

}

.line-modal {
  text-align: center;
  color: #2c3e50;
  flex-shrink: 0;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.custom-modal .close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
}

.modal-body {
  margin-top: 15px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* esquerda e direita */
  gap: 15px;
}

.umidade {
  background: #ffffff;
  color: #000000;
  padding: 10px;
  border-radius: 8px;
}

.umidade ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.umidade li {
  margin: 4px 0;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-local {
  background: #ffffff;
  color: #000000;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
}

.caixas-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.caixa {
  background: #ffffff;
  color: #000000;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
}

.caixa .valor {
  font-size: 20px;
  font-weight: bold;
  margin-top: 8px;
}

.caixa canvas {
  max-width: 120px;
  max-height: 120px;
  margin: 10px auto 0;
}

footer {
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(25, 25, 79, 1);
  color: white;
  text-align: center;
  padding: 10px 20px;
  position: fixed;
}



.footer-text {
  text-align: center;
  flex: 1;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  right: 20px;
}

/*.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 450px;
  animation: fadeIn 0.3s ease;
}

.modal-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}*/



@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
}

.modal-content {
  background: #19194F;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 650px;
  /* AQUI AUMENTA O TAMANHO */
  max-width: 90%;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  border: 10px solid;
  border-color: #964B00;
}

.modal-close {
  float: right;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
}


/* Fundo */
.modal-ihalagou {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Caixa principal */
.modal-content-ihalagou {
  background: #0f1b45;
  color: white;
  width: 55%;
  margin: 40px auto;
  padding: 25px;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);

}

/* Título */
.modal-content-ihalagou h2 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 18px;
  color: #ffffff;
 border-bottom: 1px solid #fff3;
  padding-bottom: 6px;
}

/* Botão fechar */
.close-modal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}

/* Grid */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
}

/* Cartões */
.card-info {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  color: #000000;
}

.card-info h3 {
  margin-top: 0;
  font-size: 16px;
  color: #19194F;
}

#modalTitulo h2 {
  color: #d1ecff;
}

.big-number {
  font-size: 26px;
  font-weight: bold;
  margin-top: 5px;
}

.pluvio-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pluvio-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Gráfico */
.card-grafico {
  grid-column: span 2;
  background: #ffffff;
  padding: 15px;
  border-radius: 12px;
}

#graficoNivel {
  width: 100% !important;
  height: 220px !important;
}


/* Gráfico UMIDADE */
.bars-stack {
  display: flex;
  flex-direction: column;
}

.chart-row {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 55px;
  position: relative;
}

.depth-label {
  width: 45px;
  text-align: right;
  font-size: 12px;
  color: #333;
  padding-right: 6px;
  border-bottom: 1px solid #999;
  padding-bottom: 2px;
}

.bar {
  width: 80px;
  height: 100%;
  border-radius: 2px;
}

.value-badge {
  margin-left: 10px;
  border: 1px solid #1A1A40;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  color: #1A1A40;
  background: white;
  position: relative;
  top: -18px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

 /*================================RESPONSIVIDADE==================*/
@media (max-width: 1024px) {
  .cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-container .card:last-child {
    grid-column: 1 / -1;
  }

  footer{
        margin-top: 32px;
  }
}


@media screen and (max-width: 820px) and (min-height: 1100px) {

  body {
    overflow: hidden;
  }

  /* ===== NAV ===== */
  .nav {
    height: 50px;
    padding: 0 1rem;
  }

  .nav__logo img {
    height: 26px;
  }

  .nav__logo-text {
    font-size: 11px;
    line-height: 1.2;
  }

  .nav__link {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

}


  /* ============ MEDIA QUERIES ============ */

/* Para telas pequenas (smartphones) */
@media screen and (max-width: 768px) {
  .nav {
    padding: 0 1rem;
  }
  
    .icon img {
    display: none;
  }
  .nav__list {
    gap: 0.5rem;
  }
  
  .nav__link {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  
  .nav__logo-text {
    display: none;
  }
  

  
  .containes-cards {
    gap: 15px;
  }
  
  .card {
    width: 100%;
    /*max-width: 300px;*/
    min-height: 70px;
  }
  
  .container-coluna {
    flex-direction: column;
    margin-left: 0;
    padding: 0 15px;
  }
  
  .sinalizacao {
    width: 100%;
  }
  
  .alerta-card {
    width: 100%;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

      .cards-container {
        flex-direction: column;
    }
}

/* Para a resolução específica 800×1130 (monitor em pé) */
@media screen and (min-width: 800px) and (max-width: 1130px) and (min-height: 1130px) {
  body {
    font-size: 14px;
  }
  
  main {
    height: auto;
    min-height: calc(1130px - 55px - 60px);
  }
  
  
  .text-content {
    max-width: 100%;
    margin-left: 0;
    margin-bottom: 25px;
  }
  
  .text-content h1 {
    font-size: 28px;
  }
  
  .image-content img {
    margin-right: -20px;
    width: 90%;
    max-width: 500px;
    margin-left: 10px;
  }
  
  
  .nav {
    padding: 0 1.5rem;
  }
  
  .nav__link {
    padding: 0.6rem 0.8rem;
  }
}

/* Para tablets em modo paisagem */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .container-component {
    flex-direction: row;
    padding: 15px 20px;
  }
  
  .text-content {
    max-width: 50%;
  }

  
  .image-content img {
    width: 300px;
    height: 150px;
  }
  
}

/* Para desktops pequenos */
@media screen and (min-width: 1024px) and (max-width: 1280px) {
  .container-coluna {
    max-width: 1200px;
    margin: 25px auto;
  }

}

/* Para telas muito grandes */
@media screen and (min-width: 1440px) {
  .container-coluna {
    max-width: 1400px;
    margin: 30px auto;
  }
  
  .containes-cards {
    max-width: 1400px;
    margin: 30px auto;
  }
  
  .container-component {
    margin: 0 auto;
  }
}

/* Para telas muito pequenas (smartphones pequenos) */
@media screen and (max-width: 480px) {
  .nav {
    padding: 0 0.5rem;
  }
    .icon img {
    display: none;
  }
  .nav__logo img {
    height: 25px;
  }
  
  .nav__link {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
  
  .text-content h1 {
    font-size: 20px;
  }
  
  .stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    width: 100%;
  }

   .content-info {
        flex-direction: column;
        text-align: center;
    }
  .stat-box {
    padding: 0.4rem 0.2rem;
    font-size: 0.7rem;
  }

    .stat-box img {
    width: 15px;
    height: auto;
  }

    .stat-box .texto {
    font-size: 0.6rem;
    line-height: 1;
  } 

    .cards-container {
        grid-template-columns: 1fr;
    }

    .cards-container .card:last-child {
        grid-column: auto;
    }

}

/* Ajustes para evitar overflow horizontal */
@media screen and (max-width: 400px) {
  .nav__list {
    gap: 0.3rem;
  }

    .icon img {
    display: none;
  }
  
  .nav__link {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }
  
}  
