:root {
  --bg: #0f1117;
  --card: #171a23;
  --card-2: #1d2130;
  --text: #e7e9ef;
  --muted: #8a90a3;
  --accent: #38bdf8;
  --ok: #34d399;
  --warn: #fbbf24;
  --border: #262b3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

.conn {
  font-size: 13px;
  color: var(--muted);
}

.conn.online {
  color: var(--ok);
}
.conn.offline {
  color: var(--warn);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 22px;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.card-value {
  font-size: 34px;
  font-weight: 700;
}

.switches {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.switch-name {
  font-size: 14px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #2a2f42;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.toggle.on {
  background: var(--accent);
}
.toggle.on::after {
  transform: translateX(20px);
}

.thermo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.thermo-temp {
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
}

.thermo-row {
  display: flex;
  gap: 10px;
}

.btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: #272c40;
}

.hint {
  margin: 0 22px 28px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}

.hint code {
  background: var(--card-2);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--accent);
}
