/* 기본 스타일 */
body {
	margin: 0;
	font-family: 'Segoe UI', sans-serif;
	background-color: #f7f9fc;
	color: #333;
}

header.dashboard-header {
	background-color: #4caf50;
	color: white;
	padding: 15px;
	text-align: center;
}

.card {
	background: #fff;
	margin: 20px;
	padding: 20px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 30px;
}
.device-table th, .device-table td {
    font-size: 16px;
    padding: 6px;
    text-align: center;
}

/* 값이 변경된 셀에 적용할 깜빡임 애니메이션 */
.highlight {
    animation: highlightFade 1.5s ease-in-out;
}

@keyframes highlightFade {
    0% { background-color: #ffe599; }
    100% { background-color: transparent; }
}

.row-disconnected {
    background-color: #ffe6e6 !important; /* 연한 붉은색 */
}



/* 모달 스타일 */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.5);
	justify-content: center;
	align-items: center;
	z-index: 999;
    overflow-y: auto;

}

.modal-content {
	background: white;
	padding: 20px;
	border-radius: 8px;
	max-height: 80%;
	overflow-y: auto;
	width: 90%;
	max-width: 600px;
}

.modal-scroll {
	overflow-y: auto;
	max-height: 80vh;
}

 /* 전체화면 컨텐츠 영역 */
.modal-content-full {
    background-color: #fff;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    position: relative;
}


.status-indicator {
	display: flex;
	align-items: center;
	justify-content: center;
    gap: 4px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.status-indicator .dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

.status-indicator.on .dot {
	background: radial-gradient(circle at center, #00ff00 0%, #009900 100%);
    animation: blinkOn 1.5s infinite;
}

.status-indicator.off .dot {
	background: radial-gradient(circle at center, #ff4444 0%, #990000 100%);
    opacity: 0.6;
}
.status-indicator .label {
  font-size: 16px;
}
@keyframes blinkOn {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}


.close-btn {
	background: #f44336;
	color: white;
	border: none;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
	margin-top: 10px;
}

button {
	background-color: #4caf50;
	border: none;
	color: white;
	padding: 10px;
	border-radius: 4px;
	cursor: pointer;
}

button:hover {
	opacity: 0.9;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #4caf50;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}