body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7fb;
  padding: 20px;
}
h1 {
  text-align: center;
  margin-bottom: 20px;
}
#refresh-btn {
  display: block;
  margin: 20px auto 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background: #4f46e5;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
#refresh-btn:hover {
  background: #3730a3;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.device-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #111827;
}
.device-state {
  font-size: 16px;
  margin-bottom: 8px;
}
.device-time {
  font-size: 14px;
  color: #6b7280;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.login-card {
  width: 100%;
  max-width: 350px;
  text-align: center;
}
.login-card input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}
.login-card button {
  width: 100%;
}
.error {
  color: red;
  margin-bottom: 15px;
}