/* Estilos gerais */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1f232f;
  --secondary: #2a2f3d;
  --accent: #3e32b5;
  --text-light: #ffffff;
  --text-muted: #8da1c2;
  --danger: #f4425c;
  --success: #36eeb6;
  --warning: #f7aa38;
  --gauge-height: 120px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0c0f1d, #1d2335);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Classes já existentes no seu styles.css, ajustadas para o login */
.container {
    max-width: 1200px; /* Aumentado para corresponder ao estilo do seu site principal */
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Nova classe para o container do formulário */
.form-containerLogin {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

/* Estilo para o formulário de login */
#loginForm {
    background-color: #333; /* Fundo cinza escuro, como o das opções do dashboard */
    padding: 30px; /* Espaço interno maior */
    border-radius: 10px; /* Bordas arredondadas */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Sombra para profundidade */
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Espaço entre os elementos do formulário */
}

/* Estilo para os campos de email e senha */
#loginForm .input-group {
    display: flex;
    flex-direction: column;
}

#loginForm label {
    font-size: 1em;
    margin-bottom: 5px;
    color: #f0f0f0;
}

#loginForm input {
    width: 100%;
    padding: 12px; /* Maior espaçamento interno para os inputs */
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
    font-size: 1em;
    box-sizing: border-box;
}

#loginForm input:focus {
    outline: none;
    border-color: #36eeb6;
}

/* Estilo para o botão de login */
#loginForm button[type="submit"] {
    background-color: #4F4F4F; /* Cor de fundo do botão do seu dashboard */
    color: white;
    border: none;
    padding: 15px; /* Botão maior */
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#loginForm button[type="submit"]:hover {
    background-color: #696969; /* Escurece a cor no hover */
}

/* Header */
.main-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 40px 0 20px;
  position: relative;
}

.main-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(to right, #49eefa, #36eeb6);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.main-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Opções da página inicial */
.dashboard-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.dashboard-optionsLogin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.dashboard-option {
  background: var(--secondary);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}

.dashboard-option:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,.4);
}

.dashboard-option i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #49eefa;
}

.dashboard-option h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.dashboard-option p {
  color: var(--text-muted);
}

/* Footer */
footer {
  margin-top: auto;
  padding: 20px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* [Restante do CSS anterior permanece igual...] */

/* Media queries para responsividade */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-header h1 {
    font-size: 2rem;
    padding: 0 20px;
  }
  
  .dashboard-options {
    grid-template-columns: 1fr;
  }
  
  .cards-container {
    flex-direction: column;
    align-items: center;
  }
  
  .beer-selection {
    grid-template-columns: 1fr;
  }
}
header{text-align:center;margin-bottom:20px;padding:20px 0;position:relative}
header h1{font-size:2.5rem;margin-bottom:10px;
  background:linear-gradient(to right,#49eefa,#36eeb6);
  background-clip:text;-webkit-text-fill-color:transparent;
  text-shadow:0 2px 4px rgba(0,0,0,.1)}
header p{color:var(--text-muted);font-size:1.1rem;max-width:600px;margin:0 auto}

/* Layout Principal */
.dashboard{display:flex;flex-direction:column;gap:25px;margin-bottom:30px;width:100%}

#string-value {
  white-space: pre-line; /* Isso respeitará quebras de linha e <br> */
  min-height: 40px; /* Altura suficiente para duas linhas */
}

/* Cards Superiores Centralizados */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
  align-items: stretch;
}

.card {
  background: var(--secondary);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  transition: transform .3s ease, box-shadow .3s ease;
  width: 100%;
  max-width: 300px;
  max-height: 450px;
  display: flex;
  flex-direction: column;
  height: auto;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.status-bottom {
  margin-top: auto;
  padding-top: 15px;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,.4);
}

/* Card de Mensagens */
.message-card {
  background: var(--secondary);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  transition: transform .3s ease, box-shadow .3s ease;
  width: 100%;
}

/* Seletores */
.selection-container {
  background: var(--secondary);
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  width: 100%;
}

.card-title {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.2rem;
}

.card-title i {
  margin-right: 10px;
  font-size: 1.4rem;
}

.gauge-container {
  margin: 0 auto 1px;
  position: relative;
  flex-shrink: 0; /* Evita que o gauge diminua */
}

#speedtest {
  position: relative;
  width: 100%;
  height: var(--gauge-height);
  padding: 0 10px;
  flex-shrink: 0; /* Evita que o gauge diminua */
}

#gauge {
  width: 100%;
  height: 100%;
}

#gauge rect {
  width: 8px;
  height: 144px;
  y: calc(var(--gauge-height) - 64px);
  transition: all .3s ease;
}

#gauge rect.current {
  height: 200%;
  y: 0;
}

#gauge rect.current~rect {
  fill: #3a4255!important;
}

#gauge-label {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,.3);
}

#gauge-units {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

#speedtest:before,
#speedtest:after {
  display: block;
  position: absolute;
  bottom: 15px;
  font-size: .9rem;
  color: var(--text-muted);
}

#speedtest:before {
  content: "0";
  left: 20px;
}

#speedtest:after {
  content: "5";
  right: 20px;
}

.temperature-gauge {
  width: 200px;
  height: 180px;
  margin: 0 auto;
}

.temperature-value {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1px;
}

.temperature-units {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.status-container {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.status-item {
  text-align: center;
  flex: 1;
}

.status-label {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.status-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.message-content {
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 20px;
  min-height: 100px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  display: flex;
  align-items: center;
  transition: all .3s ease;
  box-shadow: 0 4px 15px rgba(62,50,181,.3);
}

.button:hover {
  background: #5347c9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(62,50,181,.4);
}

.button i {
  margin-right: 10px;
  font-size: 1.3rem;
}

.logout-button {
  background-color: #191970;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
}

.logout-button:hover {
  background-color: #d1304d;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(244, 66, 92, 0.4);
}

.timestamp {
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 15px;
}

.debug {
  margin-top: 30px;
  padding: 20px;
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  width: 100%;
  font-family: monospace;
  font-size: .9rem;
  color: #ef4655;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word; 
}

.status-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 10px;
  background: #7f8c8d;
}

.status-indicator.connected {
  background: var(--success);
  box-shadow: 0 0 8px rgba(54,238,182,.6);
}

/* Seletores de Cerveja */
.beer-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.selection-group {
  display: flex;
  flex-direction: column;
}

.selection-group label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.selection-group select {
  background: var(--primary);
  color: var(--text-light);
  border: 1px solid var(--text-muted); 
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.selection-group select:hover {
  border-color: rgba(255,255,255,0.4);
}

.selection-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(62,50,181,0.3);
}

.target-info {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.target-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.target-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.target-value {
  font-size: 1.3rem;
  font-weight: 700;
}

/* Ajustes para dispositivos móveis */
@media (max-width: 768px) {
  .cards-container {
    flex-direction: column;
    align-items: center;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .beer-selection {
    grid-template-columns: 1fr;
  }
}

/* ajustes gauge temperatura */
#gauge_temperatura .value,
#gauge_temperatura .dial {
  stroke-width: 8px;
  stroke-linecap: round;
  transition: stroke 0.5s ease; /* Transição suave para mudança de cor */
}

.status-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.status-legend {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.status-color {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  margin-right: 5px;
}

/* Início do alerta para cilindro com pouca pressão e vazamento */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.alerta-ativo {
  background-color: #fff8f8;
  transition: background-color 0.5s;
}

#alerta-cilindro {
  border-radius: 8px;
  padding: 15px;
  font-size: 1.1em;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: none; /* Inicialmente oculto */
  margin: 20px auto; /* Centraliza horizontalmente e dá espaço vertical */
  width: 80%; /* Largura controlada */
  text-align: center; /* Texto centralizado */
  color: white; /* Texto branco */
  position: relative;
  overflow: hidden;
}

#alerta-cilindro i {
  margin-right: 10px;
}

#alerta-cilindro.pulsing-alert {
  animation: pulse 1.5s infinite;
}

/* Adicionar ícone diferente para cada tipo de alerta */
#alerta-cilindro.pressao::before {
  content: '\f071'; /* Ícone de exclamção triângulo */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 10px;
}

#alerta-cilindro.vazamento::before {
  content: '\f773'; /* Ícone de vazamento */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 10px;
}

/* Efeito de brilho para alertas críticos */
#alerta-cilindro.vazamento::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.3) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.alerta.pressao {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  border-left: 5px solid #e65100;
}

.alerta.vazamento {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  border-left: 5px solid #b71c1c;
  animation: pulse 0.8s infinite;
}

/* Fim do alerta para cilindro com pouca pressão e vazamento */