/* Style dùng chung - design system HydroLogic Intelligence (Glassmorphism). */
body {
  font-family: 'Inter', sans-serif;
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.fill-icon {
  font-variation-settings: 'FILL' 1;
}

/* Toggle switch (bơm/đèn) */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #c3c6d6;
  border-radius: 9999px;
  transition: 0.3s;
}
.switch-slider:before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.switch input:checked + .switch-slider {
  background: #006e2f;
}
.switch input:checked + .switch-slider:before {
  transform: translateX(24px);
}
.switch input:disabled + .switch-slider {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Tường minh cho trạng thái checked + disabled (auto mode đang ON) */
.switch input:checked:disabled + .switch-slider {
  background: #006e2f;
}
.switch input:checked:disabled + .switch-slider:before {
  transform: translateX(24px);
}

/* Hiệu ứng cập nhật giá trị realtime */
@keyframes value-flash {
  0% { background-color: rgba(0, 110, 47, 0.18); }
  100% { background-color: transparent; }
}
.value-flash {
  animation: value-flash 0.8s ease-out;
}

/* Card hover nhấc nhẹ */
.glass-card.lift {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.glass-card.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
