@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;500;600;700&display=swap');

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cabin", sans-serif;
}

/* ==================== BASE ==================== */
body {
  background: linear-gradient(135deg, #0a0a1a, #1c1c3c);
  color: #f4f4f9;
  text-align: center;
  min-height: 100vh;
  padding-top: 95px; /* espaço pro header fixo */
}

/* ==================== HEADER ==================== */
header {
  background: linear-gradient(90deg, #0059ffc0, #5f95c198);
  color: white;
  padding: 10px 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  position: fixed;   /* fixo no topo */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header img {
  height: 80px;
  margin-right: 10px;
}

.logo {
  height: 60px;
}
.contact {
  font-size: 14px;
  text-align: right;
}

/* ==================== TÍTULOS ==================== */
h1 {
  text-align: center;
  color: #f4f4f9;
  margin-bottom: 20px;
}

/* ==================== BLOCO DE INFORMAÇÕES ==================== */
.info, .gauges, .log-falhas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-bottom: 20px;
}

.box, .middle-box, .log-falhas {
  background: rgba(255,255,255,0.08);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
  margin: 10px;
}

.box {
  min-width: 150px;
  text-align: center;
}
.middle-box {
  width: 300px;
  text-align: center;
}

.gauge-container {
  text-align: center;
}
canvas {
  max-width: 300px;
}
.gauge-value {
  font-size: 20px;
  font-weight: bold;
}

.status-ok { color: #25D366; }
.status-fail { color: #ff3333; }

.dev-info {
  text-align: center;
  font-size: 12px;
  color: #ccc;
  margin: 20px 0;
}

ul {
  list-style: none;
  padding: 0;
}

.ip-info {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
}
.ip-info strong {
  font-size: 16px;
}

.refresh-btn {
  margin-top: 5px;
  padding: 5px 10px;
  border: none;
  background-color: #25D366;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}
.refresh-btn:hover {
  background: #1ebe5c;
}

/* ==================== BOTÃO WHATSAPP ==================== */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
}

.whatsapp-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 1000;
}
.whatsapp-menu a {
  padding: 10px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.whatsapp-menu a:hover {
  background-color: #f0f0f0;
}
.whatsapp-menu a:last-child {
  border-bottom: none;
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
  .middle-box { width: 90%; }
  canvas { max-width: 200px; }
  body { padding-top: 120px; }
  header { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .info, .gauges { flex-direction: column; align-items: center; }
  .box, .middle-box { width: 90%; }
  canvas { max-width: 180px; }
}

/* ====== MENU RESPONSIVO ====== */
.navbar {
  position: relative;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  transition: background 0.3s;
}

.nav-links li a:hover {
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

/* Mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    padding: 10px 0;
    border-radius: 8px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    text-align: right;
    margin: 5px 15px;
  }
}