body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    /* Texto principal em cinza escuro */
    margin: 20px;
    text-align: center;
}

h1,
h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.iframe-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.iframe-container {
    text-align: center;
}

.iframe-content {
    width: 670px;
    height: 450px;
    overflow: hidden;
    position: relative;
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.iframe-content iframe {
    width: 900px;
    height: 800px;
    border: none;
    position: absolute;
    top: -220px;
    left: -255px;
    transform: scale(1.1);
    transform-origin: top left;
}

.niveis-agua-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: 20px;
}

.niveis-agua-container {
    margin: 0 20px;
    text-align: center;
}

.progress-bar-container {
    height: 200px;
    width: 60px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 5px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.progress-bar-vertical {
    width: 40px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    height: 0;
    transition: height 0.5s ease-in-out;
    border-radius: 5px;
}

.graduation {
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 10px;
}

.graduation p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 1rem;
    color: #333;
}

.card {
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff;
}

.card h2 {
    margin-top: 0;
}

.container-fluid {
    padding: 0 15px;
}

.container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-wrapper {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* volta com wrap */
}

.dashboard {
    background-color: #777;
    color: white;
    border-radius: 20px;
    padding: 30px;
    width: 600px;
    flex: 1 1 500px;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.niveis-agua-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
}

.energia-container {
    flex: 1 1 500px;
    min-width: 300px;
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.energia-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 480px;
    max-width: 640px;
    width: 100%;
}

.energia-card p {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.tabela-energia {
    width: 100%;
    font-size: 14px;
    text-align: center;
    border-collapse: collapse;
}

.tabela-energia th {
    background-color: #f8f8f8;
    color: #333;
    font-weight: bold;
    padding: 8px;
    border-bottom: 2px solid #ccc;
}

.tabela-energia td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.tabela-energia tr:hover {
    background-color: #f3f3f3;
}

.tabela-energia td:first-child,
.tabela-energia th:first-child {
    text-align: left;
}

/* =========================
   UPS (GERAL) - UPS 01 e UPS 02
   ========================= */

.ups-header{
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
}

.row{
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* caixas ENTRADA/SAÍDA (UPS 01 e UPS 02) */
.in-arrow-box-1, .out-arrow-box-1,
.in-arrow-box-2, .out-arrow-box-2{
  color: #fff;
  padding: 16px;
  font-weight: 700;
  border-radius: 15px;
  min-width: 230px;
  font-size: 14px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* espaço entre ENTRADA e SAÍDA */
#input-box-1,
#input-box-2{
  margin-bottom: 18px;
}

#output-box-1,
#output-box-2{
  margin-top: 8px;
  line-height: 1.25;
}

/* aproxima título SAÍDA dos valores */
#output-box-1 .out-arrow-title-1,
#output-box-2 .out-arrow-title-2{
  margin-bottom: 4px;
  line-height: 1.1;
}

/* títulos (UPS 1 e UPS 2) */
.in-arrow-title-1, .out-arrow-title-1,
.in-arrow-title-2, .out-arrow-title-2,
.bat-arrow-title-1, .bat-arrow-title-2{
  color: #000;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}

/* bateria (geral) */
.bat-arrow-box{
  margin-top: 20px;
  padding: 16px;
  border-radius: 15px;
  font-weight: 700;
  color: #fff;
  min-width: 230px;
  font-size: 14px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bat-arrow-box > div{
  margin: 2px 0;
  line-height: 1.2;
}

/* =========================
   Animações
   ========================= */

/* pisca VERMELHO (crítica) */
@keyframes piscar-vermelho{
  0%{ background-color: #ff0000; }
  50%{ background-color: #cc0000; }
  100%{ background-color: #ff0000; }
}

/* pisca AMARELO (baixa piscando) */
@keyframes piscar-amarelo{
  0%{ background-color: #f1c40f; }
  50%{ background-color: #d4ac0d; }
  100%{ background-color: #f1c40f; }
}

/* =========================
   ENTRADA (UPS 01 e UPS 02)
   ========================= */

#input-box-1,
#input-box-2{
  padding-top: 10px;
  padding-bottom: 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* aproxima título dos valores */
#input-box-1 .in-arrow-title-1,
#input-box-2 .in-arrow-title-2{
  margin-bottom: 2px;
  line-height: 1.1;
}

/* linha tensão + frequência */
#input-box-1 .entrada-linha,
#input-box-2 .entrada-linha{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* =========================
   BATERIA / SAÍDA - centralização
   ========================= */

#bateria-box-1, #bateria-box-2,
#output-box-1, #output-box-2{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* =========================
   BATERIA - cores/estados
   ========================= */

/* 🟢 Normal (100% > 80%) */
#bateria-box-1.bateria-normal,
#bateria-box-2.bateria-normal{
  background-color: green;
  color: #fff;
  animation: none !important;
}

/* 🟡 Baixa sem piscar (80% > 50%) */
#bateria-box-1.bateria-baixa,
#bateria-box-2.bateria-baixa{
  background-color: #f1c40f;
  color: #000;
  animation: none !important;
}

/* 🟡 Baixa piscando (50% > 30%) */
#bateria-box-1.bateria-baixa-piscando,
#bateria-box-2.bateria-baixa-piscando{
  color: #000;
  animation: piscar-amarelo 1.2s infinite ease-in-out;
}

/* 🔴 Crítica piscando (30% > 0%) */
#bateria-box-1.bateria-critica,
#bateria-box-2.bateria-critica{
  color: #fff;
  animation: piscar-vermelho 0.8s infinite ease-in-out;
}

/* =========================
   ESTADOS (ENTRADA / SAÍDA) - aplica cor também na SAÍDA
   ========================= */

/* verde (normal) */
#input-box-1.tensao-normal,
#input-box-2.tensao-normal,
#output-box-1.tensao-normal,
#output-box-2.tensao-normal{
  background-color: green !important;
  color: #fff !important;
}

/* vermelho (baixa) */
#input-box-1.tensao-baixa,
#input-box-2.tensao-baixa,
#output-box-1.tensao-baixa,
#output-box-2.tensao-baixa{
  color: #fff !important;

  /* força o pisca */
  animation-name: piscar-vermelho !important;
  animation-duration: 1.2s !important;
  animation-iteration-count: infinite !important;
  animation-timing-function: ease-in-out !important;

  /* se algum outro lugar “fixar” a cor, o keyframe vai mandar */
}