/* Ferramenta Teste MQTT */
.mqtt-page .mqtt-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .mqtt-page .mqtt-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.mqtt-panel {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.mqtt-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--primary-dark, #0f172a);
}
.mqtt-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.mqtt-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}
.mqtt-status.connected .mqtt-status-dot { background: #16a34a; }
.mqtt-status.error .mqtt-status-dot { background: #dc2626; }
.mqtt-field {
  margin-bottom: 0.75rem;
}
.mqtt-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted, #566577);
  margin-bottom: 0.25rem;
}
.mqtt-field input,
.mqtt-field select,
.mqtt-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  font: inherit;
}
.mqtt-field textarea { min-height: 88px; resize: vertical; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.mqtt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.mqtt-log {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  background: #0f1419;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.mqtt-log .log-line { margin: 0 0 0.35rem; }
.mqtt-log .log-line time { color: #94a3b8; margin-right: 0.35rem; }
.mqtt-log .log-topic { color: #7dd3fc; }
.mqtt-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; min-height: 1.5rem; }
.mqtt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
}
.mqtt-chip button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
  color: #64748b;
}
.mqtt-chip button:hover { color: #b91c1c; }
.mqtt-help {
  font-size: 0.85rem;
  color: var(--muted, #566577);
  margin-top: 0.75rem;
  line-height: 1.5;
}
