body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: #ffffff;
  color: #2c3e50;
  /* background-image: url('https://www.greenyellow.vn/wp-content/uploads/2023/02/Reducing-our-personal-carbon-footprint.webp'); 
            background-size: cover; 
            background-position: center center; 
            background-attachment: fixed;  */

}
      
      
      /* Import Google font - Poppins */
      @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Poppins", sans-serif;
      }
      :root {
        --white-color: #fff;
        --blue-color: #4070f4;
        --grey-color: #707070;
        --grey-color-light: #aaa;
      }
      body.dark {
        background-color: #333;
        color: #fff;
      }
      body.dark .navbar {
        background-color: #222;
        color: #fff;
      }
      body.dark .sidebar {
        background-color: #222;
        color: #fff;
      }
      body.dark .site-details {
        background-color: #444;
        color: #fff;
      }
/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  left: 0;
  background-color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px; /* เอา padding ออก */
  z-index: 8000;
  box-shadow: 0 0 2px var(--grey-color-light);
}

/* โลโก้ชิดซ้ายสุด */
.header_left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 20px;
}

/* โลโก้และชื่อแอป */
.logo_item {
  display: flex;
  align-items: center;
  column-gap: 10px;
  font-size: 22px;
  font-weight: 500;
  color: var(--blue-color);
}

/* จัด text-content ให้ชิดซ้ายตามโลโก้ */
.text-content {
  flex-grow: 1;
  text-align: left;
}

.text-content h1 {
  color: green;
  font-size: 24px;
  font-weight: bold;
}

.text-content p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

.logo {
  width: 90px;
  height: auto;
  margin-left: 0; /* เอา margin ออก */
}

/* ปุ่ม Login */
.header_content {
  display: flex;
  align-items: center;
  column-gap: 15px;
}

.login_button {
  background-color: transparent;
  color: #333;
  padding: 5px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.login_button:hover {
  background-color: #3333333e;
}

.login_button i {
  font-size: 20px;
}

@media (max-width: 768px) {
  .header {
    display: flex;
    flex-direction: column; /* บังคับให้เรียงเป็นแนวตั้ง */
    align-items: center; /* จัดให้อยู่ตรงกลาง */
    justify-content: center;
    height: auto;
    padding: 10px;
    text-align: center;
  }

  .header_left {
    position: absolute;
    left: 10px; /* ดันไปซ้ายสุด */
    top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .logo {
    width: 80px; /* ปรับขนาดโลโก้ให้พอดี */
    height: auto;
  }

  .text-content {
    font-size: 12px;
    max-width: 100%;
    padding: 5px 10px;
  }

  .header_content {
    width: 100%;
    display: flex;
    justify-content: center; /* ปุ่ม Login อยู่ตรงกลาง */
    margin-top: 10px;
  }

  .login_button {
    width: auto;
  }
}


  
      /* sidebar */
      .sidebar {
        background-color: var(--white-color); 
        width: 200px;
        position:fixed;
        top: 0;
        left: 0;
        height: 100%;
        padding: 80px 20px;
        z-index: 100;
        overflow-y: scroll;
        /* box-shadow: 0 0 1px var(--grey-color-light); */
        transition: all 0.5s ease;
      }
      /* ปุ่ม ☰ */
#sidebarOpen {
  display: none; /* ซ่อนปุ่มบนคอมพิวเตอร์ */
}
      .sidebar.close {
        padding: 60px 0;
        width: 80px;
      }
      .sidebar::-webkit-scrollbar {
        display: none;
      }
      .menu_content {
        position: relative;
      }
      .menu_title {
        margin: 15px 0;
        padding: 0 20px;
        font-size: 18px;
      }
      .sidebar.close .menu_title {
        padding: 6px 30px;
      }
      .menu_title::before {
        color: var(--grey-color);
        white-space: nowrap;
      }
      .menu_dahsboard::before {
        content: "Dashboard";
      }
      .menu_editor::before {
        content: "Editor";
      }
      .menu_setting::before {
        content: "Setting";
      }
      .sidebar.close .menu_title::before {
        content: "";
        position: absolute;
        height: 2px;
        width: 18px;
        border-radius: 12px;
        background: var(--grey-color-light);
      }
      .menu_items {
        padding: 0;
        list-style: none;
      }
  
      .navlink_icon {
        position: relative;
        font-size: 22px;
        min-width: 50px;
        line-height: 40px;
        display: inline-block;
        text-align: center;
        border-radius: 6px;
      }
      .navlink_icon::before {
        content: "";
        position: absolute;
        height: 100%;
        width: calc(100% + 100px);
        left: -20px;
      }
      .navlink_icon:hover {
        background: var(--blue-color);
      }
      .sidebar .nav_link {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 4px 15px;
        border-radius: 8px;
        text-decoration: none;
        color: var(--grey-color);
        white-space: nowrap;
      }
      .sidebar.close .navlink {
        display: none;
      }
      .nav_link:hover {
        color: var(--white-color);
        background: var(--blue-color);
      }
      .sidebar.close .nav_link:hover {
        background: var(--white-color);
      }
      .submenu_item {
        cursor: pointer;
      }
      .submenu {
        display: none;
        background-color: var(--white-color);
        padding-left: 20px;
        z-index: 1002; /* ให้ submenu อยู่เหนือ sidebar */
      }
      .submenu_item .arrow-left {
        position: absolute;
        right: 10px;
        display: inline-block;
        margin-right: auto;
      }
      .sidebar.close .submenu {
        display: none;
      }
      .show_submenu ~ .submenu {
        display: block;
      }
      .show_submenu .arrow-left {
        transform: rotate(90deg);
      }
      .submenu .sublink {
        padding: 15px 15px 15px 52px;
      }
      .bottom_content {
        position: fixed;
        bottom: 60px;
        left: 0;
        width: 260px;
        cursor: pointer;
        transition: all 0.5s ease;
      }
      .bottom {
        position: absolute;
        display: flex;
        align-items: center;
        left: 0;
        justify-content: space-around;
        padding: 18px 0;
        text-align: center;
        width: 100%;
        color: var(--grey-color);
        border-top: 1px solid var(--grey-color-light);
        background-color: var(--white-color);
      }
      .bottom i {
        font-size: 20px;
      }
      .bottom span {
        font-size: 18px;
      }
      .sidebar.close .bottom_content {
        width: 50px;
        left: 15px;
      }
      .sidebar.close .bottom span {
        display: none;
      }
      .sidebar.hoverable .collapse_sidebar {
        display: none;
      }


  /* Content Area */

  .content {
    flex: 1;
    padding: 2rem;
    margin-top: 70px;
    margin-left: 200px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 20px; /* ระยะห่างระหว่างแถว */
  }



  /* Rest of Content Styles from Original */
  .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; /* ระยะห่างระหว่างคอลัมน์ */
    margin-bottom: 20px; /* เพิ่มระยะห่างระหว่างแถว */
  }

  .col {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #000000;
    flex: 1; /* กระจายขนาดเท่าๆ กัน */
    display: flex;
    flex-direction: column;
    gap: 20px; /* ระยะห่างระหว่างคอลัมน์ */
    margin-bottom: 20px; /* เพิ่มระยะห่างระหว่างแถว */
  }

  #map {
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
  }

  canvas {
    max-height: 400px;
    /* width: 100% !important; */
  }

  h3 {
    border-bottom: 2px solid #eee; /* เส้นขอบสีอ่อน */
    padding-bottom: 5px; /* เพิ่มช่องว่างระหว่างข้อความกับเส้นขอบ */
    display: inline-block; /* ให้ขนาดพอดีกับข้อความ */
    width: 100%; /* ขยายความกว้างเต็มบรรทัด */
  }
  
  

  .site-map, .site-details {
    flex-grow: 1;
}


  .site-details {
    background: #fff;
    /* padding: 1.5rem; */
    border-radius: 8px;
  }

  .site-map h3, .site-details h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
  }

  #site-info div {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
  }

  footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.85);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: auto;
    font-size: 0.9rem;
  }
  @media (max-width: 480px) {
    .content {
      margin-left: 0 !important;
      margin-top: 300px!important;
      padding: 1rem;
      width: 100%;
    }
  
    .sidebar {
      left: -100%;
      width: 100%;
      z-index: 1000;
    }
  
    .sidebar.show {
      left: 0;
    }

    #sidebarOpen {
      display: block; /* แสดงปุ่มบนมือถือ */
      z-index: 1001; /* ให้ปุ่มอยู่เหนือ sidebar */
    }
  
    .row {
      grid-template-columns: 1fr;
    }
  
    .col {
      width: 100%;
    }
  
    #map {
      height: 250px;
    }
  }

  @media (max-width: 768px) {
    .content {
      margin-left: 0 !important;
      margin-top: 300px!important;
      padding: 1rem;
      width: 100%;
    }
  
    .sidebar {
      left: -100%;
      width: 50%;
      z-index: 9998;
      padding: 10px 10px;

    }
  
    .sidebar.show {
      left: 0;
    }

    #sidebarOpen {
      display: block; /* แสดงปุ่มบนมือถือ */
      z-index: 9999; /* ให้ปุ่มอยู่เหนือ sidebar */
    }
  
    .row {
      grid-template-columns: 1fr;
    }
  
    .col {
      width: 100%;
    }
  
    #map {
      height: 250px;
    }
  }