.getall{
	height: 60px!important;
	text-align: center;
	line-height: 60px;
	font-size: 20px;
	font-weight: bold;
}

.h40{
	height: 60px;
	font-size: 30px;
	letter-spacing: 6px;
	background-image: linear-gradient(to right, #a59c9c78 , #dbe1d966);
    color: #565656;
}
.auth{
	z-index: 999;
	font-size: 18px;
    color: #ff9800;
    position: absolute;
    top: 20px;
    right: 10px;
    animation:delauth 2s linear 2s infinite alternate ;        
}

@keyframes delauth{
	from{color: #ffb100f2;}
	to{color: #10df2a;}
}
.h50{
	height: 120px;
    padding: 0;
    /*background: red;*/
    margin: 15px 0;
    border-radius: 10px;
}
.h30{
	height: 30px;
}
.h35{
	height: 35px;
}
.h25{
	height: 25px;
}
.margin15{
	margin: 0 15px;
	background: #cdcdcd;
	color:#707070 ;
}

.onoroff{
	/*color: yellow;*/
	float:right ;
}
.deng{
	position: absolute;
    bottom: 9px;
    left: 9px;
}
.deng img{
	width: 35px;
	height: 35px;
}

.deng img:last-child{
	z-index: order;
}
.sid{
	display: none;
}
.update{
	font-size: 21px;
    background: white;
    position: absolute;
    top: 35%;
    width: 200px;
    text-align: center;
    padding: 10px 0;
    border-radius: 20px;
    left: 25%;
}
.update a{
	font-size: 16px;
	border: 1px #f8f9fa59 solid;
    background: #c9c3b852;
}
.updatebox{
	    height: 100%;
	    width: 100%;
    position: fixed;
    background: #adb5bd47;
    top: 0;
    right: 0;
    /*width: 100%;*/
    z-index: 999;
}
/* 设备卡片四区块布局 */
.device-grid-4 .device-4grid {
  display: grid;
  grid-template-areas:
    "topleft topright"
    "bottomleft bottomright";
  grid-template-columns: 3fr 1fr;
  grid-template-rows: 1fr auto;
  gap: 8px 12px;
  min-height: 80px;
}
.device-4grid-topleft {
  grid-area: topleft;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 0;
  height: 48px;
}
.device-4grid-topright {
  grid-area: topright;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  height: 48px;
}
.device-name {
  font-size: 17px;
  font-weight: 600;
  color: #357abd;
  margin-bottom: 0;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 100%;
  line-height: 1.2;
  line-clamp: 3;
}
.device-4grid-bottomleft {
  grid-area: bottomleft;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 0;
}
.device-4grid-bottomright {
  grid-area: bottomright;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.device-switch-row {
  display: flex;
  align-items: center;
  gap: 2px; /* 更紧凑 */
}
.switch-dot {
  width: 12px;
  height: 12px;
  margin-right: 2px;
  border-radius: 50%;
  display: inline-block;
  background: #d9d9d9;
}
.switch-dot.on {
  background: #52c41a;
  box-shadow: 0 0 8px #52c41a44;
}
.switch-dot.off {
  background: #ff4d4f;
  box-shadow: 0 0 8px #ff4d4f44;
}
.switch-label {
  font-size: 15px;
  margin-right: 2px;
  margin-left: 0;
  padding: 0 2px;
  color: #666;
}
.device-status-text {
  display: inline-block;
  min-width: 40px;
  text-align: right;
  font-size: 15px;
  vertical-align: middle;
}
.device-status-text.online {
  color: #52c41a;
  font-weight: bold;
}
.device-status-text.offline {
  color: #ff4d4f;
  font-weight: bold;
}
.temp-value {
  color: #ff9800;
  font-size: 20px;
  font-weight: bold;
  margin-right: 4px;
}
.temp-unit {
  color: #ff9800;
  font-size: 14px;
}
.temp-label {
  color: #ff9800;
  font-size: 13px;
  margin-left: 2px;
}
.humi-value {
  color: #2196f3;
  font-size: 20px;
  font-weight: bold;
  margin-right: 4px;
}
.humi-unit {
  color: #2196f3;
  font-size: 14px;
}
.humi-label {
  color: #2196f3;
  font-size: 13px;
  margin-left: 2px;
}
.device-icon,
.device-icon.sensor {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  max-height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 10px;
  box-sizing: border-box;
  vertical-align: middle;
}
.device-icon.sensor {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
}
.temp-humi-vertical {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
}
.temp-humi-vertical .temp-value,
.temp-humi-vertical .humi-value {
  margin-bottom: 2px;
  display: block;
}
.temp-humi-vertical .temp-label,
.temp-humi-vertical .humi-label {
  margin-top: 0;
  font-size: 13px;
  line-height: 1;
}
/* 滑动开关变大 */
.device-switch {
    width: 56px;
    height: 30px;
    background: #d9d9d9;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.device-switch.active {
    background: #52c41a;
}
.device-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.device-switch.active::after {
    left: 29px;
}
@media (max-width: 767px) {
  .device-grid-4 .device-4grid {
    grid-template-columns: 3fr 1fr;
    gap: 6px 6px;
  }
  .device-4grid-topleft, .device-4grid-topright, .device-4grid-bottomleft, .device-4grid-bottomright {
    font-size: 13px;
  }
  .device-name {
    font-size: 13px;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    line-height: 1.1;
    display: inline;
    word-break: break-all;
    max-width: 100%;
    white-space: pre-line;
  }
  .device-name {
    display: inline-block;
    max-width: 4em;
    word-break: break-all;
    white-space: pre-line;
    vertical-align: top;
  }
  .device-status-text {
    font-size: 13px;
    min-width: 32px;
  }
  .temp-humi-vertical {
    align-items: flex-start;
  }
  .device-4grid-topleft, .device-4grid-topright {
    height: 36px;
  }
  .device-icon, .device-icon.sensor {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    font-size: 16px;
    margin-right: 6px;
    box-sizing: border-box;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
  }
}
.layui-icon{
  font-size: 22px!important;
}