.system_info {
  background-color: yellow;
}

.img-fit {
  max-width: 300px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 99;
  
}
#img-battery {
  width: 30px;
}

.system {
  position: relative;
  height: 300px;
  margin-bottom: 200px;
}

.img-inverter img {
  position: relative;
  z-index: 99;
}

.pv_to_inverter {
  position: absolute;
  width: 450px;
  height: 100px;
  border-bottom: 3px solid #8ac72b;
  border-left: 3px solid #8ac72b;
  left: 85px;
  top: 140px;
}

.moving-pv_to_inverter {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #8ac72b;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: pvToIn 5s linear infinite;
}
.bms-text {
  padding-left: 15px;
}
.small-text {
  font-size: 12px;
}
.box {
  background-color: rgb(242, 247, 248);
}
.box p {
  margin: 0 0 5px;
  font-size: 15px;
}
.box {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.box-1 {
  background-color: #63bfe6;
}
.box-2 {
  background-color: #f087a0;
}
.box-3 {
  background-color: #f09c6b;
}
.box-4 {
  background-color: #57c696;
}
.card .box-text .text-box {
  color: #a6b7bf;
}
.card .box-text p {
  margin-bottom: 0;
  font-size: 22px;
}
.card-title {
  margin-bottom: 0 !important;
}
.card-title h5 {
  margin-bottom: 0 !important;
  font-size: 14px;
  font-weight: bold;
  color: white;
}
/* Overlay để phủ toàn màn hình */
#loadingOverlay {
  display: none; /* Ẩn mặc định */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8); /* hoặc màu tối tùy bạn */
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.modal-backdrop.fade.in {
  width: 100%;
  height: 100%;
}
.system-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  padding: 8px 16px;
  border-left: 4px solid #007bff;
  font-family: "Segoe UI", sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  margin-bottom: 10px;
}

.system-info .label {
  font-weight: 600;
  font-size: 16px;
  color: #343a40;
}

.system-info .timestamp {
  font-size: 14px;
  color: #6c757d;
}
/* Overlay để phủ toàn màn hình */
#loadingOverlay {
  display: none; /* Ẩn mặc định */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* hoặc màu tối tùy bạn */
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.loader {
  width: calc(80px / cos(45deg));
  height: 14px;
  --c: #000 0 15px, #0000 0 20px;
  background: repeating-linear-gradient(135deg, var(--c)) left top,
    repeating-linear-gradient(45deg, var(--c)) left bottom;
  background-size: 200% 50%;
  background-repeat: no-repeat;
  transform: translateZ(0);
  will-change: transform;
  animation: l4 2s infinite linear;
  position: relative;
  top: 50%;
  left: 50%;
  z-index: 99;
}

@keyframes l4 {
  100% {
    background-position: top right, bottom right;
  }
}

/* Di chuyển từ trên trái -> dưới trái -> dưới phải */
@keyframes pvToIn {
  0% {
    top: 130px;
    left: 75px;
  }

  30% {
    top: 230px;
    left: 75px;
  }

  100% {
    top: 230px;
    left: 520px;
  }
}

/* grid to invertter  */
.grid_to_inverter {
  position: absolute;
  width: 450px;
  height: 100px;
  border-bottom: 3px solid #eeb940;
  border-right: 3px solid #eeb940;
  right: 70px;
  top: 140px;
}

.moving-grid_to_inverter {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #eeb940;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: gToIn 5s linear infinite;
}
.moving-inverter_to_grid {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #eeb940;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: InToG 5s linear infinite;
}

@keyframes InToG {
  0% {
    top: 230px;
    right: 520px;
  }
  
  75% {
    top: 230px;
    right: 60px;
  }
  
  100% {
    top: 130px;
    right: 60px;
  }
}

.inverter_to_battery {
  position: absolute;
  width: 450px;
  height: 100px;
  border-top: 3px solid #8ac72b;
  border-left: 3px solid #8ac72b;
  left: 85px;
  bottom: -77px;
}

.moving-inverter_to_battery {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #8ac72b;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: InToB 5s linear infinite;
}

/* Di chuyển từ trên trái -> dưới trái -> dưới phải */
@keyframes InToB {
  0% {
    bottom: 15px;
    left: 520px;
  }

  75% {
    bottom: 15px;
    left: 80px;
  }

  100% {
    bottom: -80px;
    left: 80px;
  }
}

/*battery to  in verter*/
.battery_to_inverter {
  position: absolute;
  width: 450px;
  height: 100px;
  border-top: 3px solid #eeb940;
  border-left: 3px solid #eeb940;
  left: 85px;
  bottom: -77px;
}

.moving-battery_to_inverter {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #8ac72b;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: BToIn 5s linear infinite;
}

@keyframes BToIn {
  0% {
    bottom: -80px;
    left: 80px;
  }

  25% {
    bottom: 15px;
    left: 80px;
  }

  100% {
    bottom: 15px;
    left: 520px;
  }
}

/* in verter to home*/
.inverter_to_home {
  position: absolute;
  width: 460px;
  height: 100px;
  border-top: 3px solid #eeb940;
  border-right: 3px solid #eeb940;
  right: 70px;
  bottom: -77px;
}

.moving-inverter_to_home {
  position: absolute;
  font-size: 8px;
  font-weight: bold;
  color: white;
  background-color: #eeb940;
  padding: 2px 4px;
  border-radius: 50%;
  transform: translateZ(0);
  will-change: transform;
  animation: InToH 5s linear infinite;
}

@keyframes InToH {
  0% {
    bottom: 15px;
    right: 520px;
    /* 120 den inverter */
  }

  75% {
    bottom: 15px;
    /* re trai */
    right: 65px;
  }

  100% {
    bottom: -80px;
    /* bat dau o nha  */
    right: 65px;
  }
}


/*<576px */
@media (min-width: 422px) and (max-width: 575.98px) {
  .img-icon {
    width: 50px;
  }
  .card-title {
    display: none !important;
  }
  .text-box,.cus_text_box {
    font-size: 12px !important;
  }
  .system {
    margin-bottom: 110px;
  }
  
  .small-text {
    font-size: 8px;
  }
  .bms-text {
    padding-left: 5px;
  }
  .custom-text {
    font-size: 12px;
  }
  .img-fit {
    max-width: 300px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 99;
  }
  .pv_to_inverter {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-bottom: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 60px;
    top: 55px;
  }

  .moving-pv_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 80px;
      left: 50px;
    }

    30% {
      top: 145px;
      left: 50px;
    }

    100% {
      top: 145px;
      left: 220px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 33vw;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 55px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
    will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  /* Di chuyển từ trên trái -> dưới trái -> dưới phải */
  @keyframes gToIn {
    0% {
      top: 80px;
      right: 60px;
    }

    30% {
      top: 145px;
      right: 60px;
    }

    100% {
      top: 145px;
      right: 220px;
    }
  }

  /* inverter_to_battery  */

  .inverter_to_battery {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 60px;
    bottom: 20px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 110px;
      left: 240px;
    }

    70% {
      bottom: 110px;
      left: 50px;
    }

    100% {
      bottom: 20px;
      left: 50px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 60px;
    bottom: 20px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: 15px;
      left: 50px;
    }

    50% {
      bottom: 110px;
      left: 50px;
    }

    100% {
      bottom: 110px;
      left: 260px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 33vw;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: 20px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    animation: InToH 5s linear infinite;
    transform: translateZ(0);
    will-change: transform;
  }

  @keyframes InToH {
    0% {
      bottom: 110px;
      right: 220px;
    }

    50% {
      bottom: 110px;
      right: 60px;
    }

    100% {
      bottom: -10px;
      /* bat dau o nha  */
      right: 60px;
    }
  }
  
}
@media  (max-width: 421.98px) {
  .img-icon {
    width: 50px;
  }
  .card-title {
    display: none !important;
  }
  .text-box,.cus_text_box {
    font-size: 12px !important;
  }
  .system {
    margin-bottom: 110px;
  }
  
  .small-text {
    font-size: 8px;
  }
  .bms-text {
    padding-left: 5px;
  }
  .custom-text {
    font-size: 12px;
  }
  .img-fit {
    max-width: 300px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 99;
  }
  .pv_to_inverter {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-bottom: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 60px;
    top: 55px;
  }

  .moving-pv_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 80px;
      left: 50px;
    }

    30% {
      top: 145px;
      left: 50px;
    }

    100% {
      top: 145px;
      left: 180px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 33vw;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 55px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
    will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  /* Di chuyển từ trên trái -> dưới trái -> dưới phải */
  @keyframes gToIn {
    0% {
      top: 80px;
      right: 60px;
    }

    30% {
      top: 145px;
      right: 60px;
    }

    100% {
      top: 145px;
      right: 180px;
    }
  }

  /* inverter_to_battery  */

  .inverter_to_battery {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 60px;
    bottom: 20px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 110px;
      left: 240px;
    }

    70% {
      bottom: 110px;
      left: 50px;
    }

    100% {
      bottom: 20px;
      left: 50px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 34vw;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 60px;
    bottom: 20px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: 15px;
      left: 50px;
    }

    50% {
      bottom: 110px;
      left: 50px;
    }

    100% {
      bottom: 110px;
      left: 180px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 33vw;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: 20px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    animation: InToH 5s linear infinite;
    transform: translateZ(0);
    will-change: transform;
  }

  @keyframes InToH {
    0% {
      bottom: 110px;
      right: 180px;
    }

    50% {
      bottom: 110px;
      right: 60px;
    }

    100% {
      bottom: -10px;
      /* bat dau o nha  */
      right: 60px;
    }
  }
  
}

/* ≥576px và <768px: Điện thoại */
@media (min-width: 576px) and (max-width: 767.98px) {
  .custom-text {
    font-size: 13px;
  }
  .card .box-text p {
    font-size: 18px;
}
  .system {
    margin-bottom: 150px;
  }
  .small-text {
    font-size: 8px;
  }

  .img-fit {
    max-width: 300px;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 99;
  }
  .pv_to_inverter {
    width: 195px;
    height: 100px;
    left: 80px;
    top: 100px;
  }

  .moving-pv_to_inverter {
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 110px;
      left: 75px;
    }

    45% {
      top: 190px;
      left: 75px;
    }

    100% {
      top: 190px;
      left: 270px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 185px;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 100px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  /* Di chuyển từ trên trái -> dưới trái -> dưới phải */
  @keyframes gToIn {
    0% {
      top: 110px;
      right: 60px;
    }

    45% {
      top: 190px;
      right: 60px;
    }

    100% {
      top: 190px;
      right: 270px;
    }
  }

  /* inverter_to_battery  */

  .inverter_to_battery {
    position: absolute;
    width: 195px;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;

    left: 80px;
    bottom: -30px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 60px;
      left: 270px;
    }

    50% {
      bottom: 60px;
      left: 80px;
    }

    100% {
      bottom: -80px;
      left: 80px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 185px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 85px;
    bottom: -30px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: -80px;
      left: 70px;
    }

    45% {
      bottom: 60px;
      left: 70px;
    }

    100% {
      bottom: 60px;
      left: 270px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 185px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: -30px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToH 5s linear infinite;
  }

  @keyframes InToH {
    0% {
      bottom: 60px;
      right: 260px;
    }

    50% {
      bottom: 60px;
      right: 60px;
    }

    100% {
      bottom: -80px;
      right: 60px;
    }
  }
}

/* ≥768px và <992px: Máy tính bảng */
@media (min-width: 768px) and (max-width: 991.98px) {
  .box p {
    font-size: 14px;
}
  .pv_to_inverter {
    position: absolute;
    width: 300px;
    height: 100px;
    border-bottom: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    top: 140px;
  }

  .moving-pv_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 130px;
      left: 75px;
    }

    30% {
      top: 230px;
      left: 75px;
    }

    100% {
      top: 230px;
      left: 320px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 300px;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 140px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  /* Di chuyển từ trên trái -> dưới trái -> dưới phải */
  @keyframes gToIn {
    0% {
      top: 130px;
      right: 60px;
    }

    30% {
      top: 230px;
      right: 60px;
    }

    100% {
      top: 230px;
      right: 320px;
    }
  }

  /* inverter_to_battery  */

  .inverter_to_battery {
    position: absolute;
    width: 300px;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    bottom: -77px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
  transform: translateZ(0);
  will-change: transform;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 15px;
      left: 320px;
    }

    70% {
      bottom: 15px;
      left: 75px;
    }

    100% {
      bottom: -80px;
      left: 75px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 300px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 85px;
    bottom: -77px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: -80px;
      left: 80px;
    }

    30% {
      bottom: 15px;
      left: 80px;
    }

    100% {
      bottom: 15px;
      left: 320px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 300px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: -77px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToH 5s linear infinite;
  }

  @keyframes InToH {
    0% {
      bottom: 15px;
      right: 320px;
    }

    80% {
      bottom: 15px;
      right: 65px;
    }

    100% {
      bottom: -80px;
      right: 65px;
    }
  }
}

/* ≥992px và <1200px: Desktop vừa */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .pv_to_inverter {
    position: absolute;
    width: 370px;
    height: 100px;
    border-bottom: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    top: 140px;
  }

  .moving-pv_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 130px;
      left: 75px;
    }

    25% {
      top: 230px;
      left: 75px;
    }

    100% {
      top: 230px;
      left: 450px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 370px;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 140px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  @keyframes gToIn {
    0% {
      top: 130px;
      right: 60px;
    }

    25% {
      top: 230px;
      right: 60px;
    }

    100% {
      top: 230px;
      right: 450px;
    }
  }

  .inverter_to_battery {
    position: absolute;
    width: 370px;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    bottom: -77px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 15px;
      left: 450px;
    }

    75% {
      bottom: 15px;
      left: 80px;
    }

    100% {
      bottom: -80px;
      left: 80px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 370px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 85px;
    bottom: -77px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: -80px;
      left: 80px;
    }

    25% {
      bottom: 15px;
      left: 80px;
    }

    100% {
      bottom: 15px;
      left: 450px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 370px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: -77px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToH 5s linear infinite;
  }

  @keyframes InToH {
    0% {
      bottom: 15px;
      right: 450px;
      /* 120 den inverter */
    }

    75% {
      bottom: 15px;
      /* re trai */
      right: 65px;
    }

    100% {
      bottom: -80px;
      /* bat dau o nha  */
      right: 65px;
    }
  }
  
}

/* ≥1200px: Desktop lớn */
@media (min-width: 1200px ) and (max-width: 1399.99px){

}
@media (min-width: 1400px) {
  .pv_to_inverter {
    position: absolute;
    width: 550px;
    height: 100px;
    border-bottom: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    top: 140px;
  }

  .moving-pv_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: pvToIn 5s linear infinite;
  }

  @keyframes pvToIn {
    0% {
      top: 130px;
      left: 75px;
    }

    20% {
      top: 230px;
      left: 75px;
    }

    100% {
      top: 230px;
      left: 580px;
    }
  }

  /* grid to invertter  */
  .grid_to_inverter {
    position: absolute;
    width: 550px;
    height: 100px;
    border-bottom: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    top: 140px;
  }

  .moving-grid_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: gToIn 5s linear infinite;
  }

  /* Di chuyển từ trên trái -> dưới trái -> dưới phải */
  @keyframes gToIn {
    0% {
      top: 130px;
      right: 60px;
    }

    20% {
      top: 230px;
      right: 60px;
    }

    100% {
      top: 230px;
      right: 580px;
    }
  }

  /* inverter_to_battery  */

  .inverter_to_battery {
    position: absolute;
    width: 550px;
    height: 100px;
    border-top: 3px solid #8ac72b;
    border-left: 3px solid #8ac72b;
    left: 85px;
    bottom: -77px;
  }

  .moving-inverter_to_battery {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToB 5s linear infinite;
  }

  @keyframes InToB {
    0% {
      bottom: 15px;
      left: 580px;
    }

    80% {
      bottom: 15px;
      left: 80px;
    }

    100% {
      bottom: -80px;
      left: 80px;
    }
  }

  /*battery to  in verter*/
  .battery_to_inverter {
    position: absolute;
    width: 550px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-left: 3px solid #eeb940;
    left: 85px;
    bottom: -77px;
  }

  .moving-battery_to_inverter {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #8ac72b;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: BToIn 5s linear infinite;
  }

  @keyframes BToIn {
    0% {
      bottom: -80px;
      left: 80px;
    }

    20% {
      bottom: 15px;
      left: 80px;
    }

    100% {
      bottom: 15px;
      left: 580px;
    }
  }

  /* in verter to home*/
  .inverter_to_home {
    position: absolute;
    width: 550px;
    height: 100px;
    border-top: 3px solid #eeb940;
    border-right: 3px solid #eeb940;
    right: 70px;
    bottom: -77px;
  }

  .moving-inverter_to_home {
    position: absolute;
    font-size: 8px;
    font-weight: bold;
    color: white;
    background-color: #eeb940;
    padding: 2px 4px;
    border-radius: 50%;
    transform: translateZ(0);
  will-change: transform;
    animation: InToH 5s linear infinite;
  }

  @keyframes InToH {
    0% {
      bottom: 15px;
      right: 580px;
    }

    80% {
      bottom: 15px;
      /* re trai */
      right: 65px;
    }

    100% {
      bottom: -80px;
      /* bat dau o nha  */
      right: 65px;
    }
  }
}



