* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

h1,
h2,
h3 {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 12px;
}

button {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-on {
  background: #16a34a;
  color: #fff;
}

.btn-off {
  background: #6b7280;
  color: #fff;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.row button {
  flex: 1;
}

.error {
  color: #dc2626;
  font-size: 14px;
  min-height: 20px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: #16a34a;
}

.status-dot.offline {
  background: #dc2626;
}

.relay-state.on {
  color: #16a34a;
  font-weight: bold;
}

.relay-state.off {
  color: #dc2626;
  font-weight: bold;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.top-bar p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.install-banner {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.install-banner button {
  margin-top: 8px;
}
