/* ===== RESET ===== */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Segoe UI, Arial, sans-serif;
}

body{
  background: radial-gradient(circle at top, #1a1f3a, #0b1220);
  color:#fff;
}

/* ===== NAVBAR ===== */
.navbar{
  height:60px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px;
  background:rgba(15,23,42,0.9);
  border-bottom:1px solid rgba(255,255,255,0.05);
}

.logo{
  font-size:18px;
  font-weight:600;
  color:#60a5fa;
}

.menu a{
  margin-left:18px;
  text-decoration:none;
  color:#cbd5e1;
  font-size:14px;
  transition:0.2s;
}

.menu a:hover{
  color:#60a5fa;
}

/* ===== APP ===== */
.app{
  display:flex;
  height:calc(100vh - 60px);
}

/* ===== SIDEBAR ===== */
.sidebar{
  width:260px;
  padding:15px;
  background:rgba(15,23,42,0.7);
  border-right:1px solid rgba(255,255,255,0.05);
}

.sidebar h3{
  color:#60a5fa;
  margin-bottom:12px;
}

/* ===== GATEWAY ===== */
.gateway{
  padding:12px;
  border-radius:10px;
  background:#1e293b;
  margin-bottom:10px;
  cursor:pointer;
  display:flex;
  justify-content:space-between;
  align-items:center;
  transition:0.2s;
}

.gateway:hover{
  background:#2563eb;
}

/* ===== NODE ===== */
.node{
  margin-left:10px;
  padding:10px;
  border-radius:10px;
  margin-bottom:6px;
  font-size:13px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* trạng thái */
.node.on{
  background:#22c55e;
}

.node.off{
  background:#374151;
  border-left:3px solid #ef4444;
}

/* ===== MAIN ===== */
.main{
  flex:1;
  padding:20px;
}

/* ===== TOOLBAR ===== */
.toolbar{
  display:flex;
  gap:15px;
  margin-bottom:20px;
}

.stat-box{
  background:rgba(30,41,59,0.7);
  padding:12px 18px;
  border-radius:12px;
  backdrop-filter:blur(10px);
}

.stat-box b{
  margin-left:6px;
}

.alert{
  color:#f87171;
}

/* ===== CARD ===== */
.card{
  background:rgba(30,41,59,0.6);
  border-radius:16px;
  padding:20px;
  margin-bottom:20px;
  backdrop-filter:blur(10px);
  box-shadow:0 8px 20px rgba(0,0,0,0.4);
}

.card-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.card h3{
  color:#60a5fa;
}

.card-body{
  color:#e2e8f0;
}

/* ===== BUTTON ===== */
button{
  border:none;
  padding:8px 14px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
}

button:disabled{
  opacity:0.4;
}

#btnControl{
  background:#3b82f6;
  color:white;
}

#btnSchedule{
  background:#374151;
  color:white;
}

/* ===== MODAL ===== */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
}

.hidden{
  display:none;
}

.modal-box{
  background:#1e293b;
  padding:20px;
  border-radius:14px;
  width:300px;
}

.modal-box input{
  width:100%;
  padding:8px;
  margin-bottom:10px;
  border-radius:6px;
  border:none;
}

/* ===== RANGE ===== */
.range-box{
  display:flex;
  align-items:center;
  gap:10px;
}