body {
    margin: 0;
    font-family: 'Segoe UI';
    background: #0f172a;
    color: white;
    display: flex;
}

.sidebar {
    width: 220px;
    background: #111827;
    padding: 20px;
    height: 100vh;
}

.sidebar h2 {
    color: #38bdf8;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 10px 0;
    cursor: pointer;
    color: #94a3b8;
}

.sidebar li:hover {
    color: white;
}

.main {
    flex: 1;
    padding: 30px;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    flex: 1;
}

.device-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.device-card {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.status-online {
    color: #22c55e;
}

.status-offline {
    color: #ef4444;
}

button {
    padding: 8px 15px;
    margin: 5px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.btn-on {
    background: #22c55e;
}

.btn-off {
    background: #ef4444;
}
/* =====================
   SWITCH SLIDER
===================== */

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .4s;
  border-radius: 999px;
}

.slider:before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #22c55e;
}

.switch input:checked + .slider:before {
  transform: translateX(24px);
}

.switch input:disabled + .slider {
  background-color: #475569;
  cursor: not-allowed;
}
