/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/*ส่วนของพื้นเว็บ*/
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-y: scroll;
  }

body::-webkit-scrollbar {
  display: none; /* สำหรับ WebKit-based browsers */
}
  
  header {
    background-color: #b4a045;
    color: white;
    padding: 15px;
    text-align: center;
  }
  
  h1 {
    margin: 0;
  }
  .clear {
    clear: both;
  }
  .header-logoarea {
    width: max-content;
    margin: 0 auto;
  }
  .header-logo {
    height: 120px;
    float: left;
  }
  .header-logo img {
    width: 100%;
    height: 100%;
  }
  #logon1 {
    border-radius: 50%;
    width: 80%;
    height: 80%;
  }
  @media (max-width: 600px) {
    .header-h1 {
      font-size: 22px;
    }
    .header-logoarea {
      width: max-content;
      margin: 0 auto;
    }
    .header-logo {
      height: 60px;
      float: left;
    }
    .header-logo img {
      width: 100%;
      height: 100%;
    }
  }
/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ ยืนยันผู้ใช้ */
#loginform{
  width: 100%;
  max-width: 600px;
  margin: auto;
  text-align: center;
}
#loginform label{
  width: 100%;
  font-size: 20px;
}
#loginform input{
  width: 100%;
  font-size: 18px;
  padding: 5px;
}
#loginform button{
  width: 200px;
  font-size: 18px;
  padding: 5px;
  margin: 20px 0px;
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ หน้าโหลด */
  .loading-text {
    margin-top: 10px;
    font-size: 18px;
    color: #000;
  }
  .loadingcontainer {
    text-align: center;
    width: 100%;
    position: fixed;
    top: 40%;
    height: 100vh;
    
  }
  .loader {
    display: inline-block;
  }
  .loader div {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 3px;
    background-color: #b4a045;
    border-radius: 50%;
    animation: bounce 1.4s infinite;
  }
  .loader div:nth-child(2) {
    animation-delay: -0.32s;
  }
  .loader div:nth-child(3) {
    animation-delay: -0.16s;
  }
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
  }
  .loading-text {
    margin-top: 10px;
    font-size: 18px;
    color: #333;
  }

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ การแจ้งเตือน */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* พื้นหลังโปร่งใส */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* ให้อยู่ด้านบนสุด */
    overflow-y: scroll;
}
.overlay::-webkit-scrollbar {
  display: none; /* สำหรับ WebKit-based browsers */
}
#alert {
  position: fixed;        /* ให้อยู่คงที่เหนือจอ */
  top: 0;                 /* ติดบนหน้าจอ */
  left: 0;
  width: 100%;            /* กว้างเต็มหน้าจอ */
  color: #000;
  background-color: #0005;
  text-align: center;
  padding: 10px;
  z-index: 99999;         /* อยู่บนสุด */
}

#alertform {
    background-color: #e1dc51;
    border-radius: 10px;
    padding: 10px 30px;
    width: 50%;
    max-width: 480px;
    min-width: 240px;
    box-shadow: 2px 1px 8px 1px #222222;
}
#alertform button{
  height: 40px;
  width: 70px;
  font-size: 18px;
  background-color: #f6f26b;
  border: 1px solid #c4b31b;
  border-radius: 5px;
  margin: auto;
}
#alertform button:hover{
  background-color: #f6e762;
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ เมนูบน */
  nav {
    position: relative;
  }
  #navbar img{
    filter: invert(100%);
  }
  
  .menu {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #0000;
    cursor: pointer;
  }
  
  .menu li {
    margin: 0 5px;
    padding: 5px 10px;
  }
  .menu li:hover {
    background-color: #a08c35;
    border-radius: 5px;
  }
  
  .menu li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
  }
  
  .icon {
    margin-right: 5px;
  }
  
  .hamburger {
    display: none;
    position: absolute;
    left: 10px;
    top: 15px;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    transition: transform 0.3s ease; /* เพิ่มแอนิเมชันการหมุน */
  }
  .rotate {
    transform: rotate(90deg); /* หมุน 180 องศา */
  }
  
  .mobile-menu {
    display: none;
    list-style: none;
    padding: 0;
    background-color: #444;
  }
  
  .mobile-menu li {
    padding: 10px;
  }
  
  .mobile-menu li a {
    color: white;
    text-decoration: none;
    display: block;
    text-align: left;
    margin-left: 20px;
  }
  .icon {
    width: 20px;  /* กำหนดขนาดไอคอนตามที่ต้องการ */
    height: 20px; 
    margin-right: 5px; /* กำหนดระยะห่างระหว่างไอคอนและข้อความ */
    vertical-align: middle; /* จัดแนวไอคอนให้ตรงกับข้อความ */
  }
  
  
  @media (max-width: 600px) {
    h1{
      font-size: 26px;
    }
    .menu {
      display: none;
    }
  
    .hamburger {
      display: block;
    }
  
    .mobile-menu {
      display: none;
      flex-direction: column;
      background-color: #9a8839;
    }
  
    .mobile-menu.show {
      display: flex;
    }
  }
  
  section {
    padding: 20px;
    background-color: #f4f4f4;
    margin-bottom: 10px;
    border-radius: 5px;
  }
  
section {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ ฟอร์มกรอกข้อมูล*/
.activityForm {
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin: 20px auto;
  padding: 10px 0px;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: solid 1px #000;
}

/* ตั้งขนาด input */
input#idInput {
  width: 50px;
}

#activityInput {width: 1000px; height: 20px;}
#descriptioninput {
  width: 990px; height: 100px;
  padding: 5px;
  margin: auto;
  resize: none;
}
#noteInput {width: 900px; height: 20px;}

.activityForm .form-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.activityForm label {
  margin-bottom: 5px;
}

.activityForm input {
  padding: 5px;
}

.activityForm button {
  padding: 10px 20px;
  margin: 20px 0px 0px 0px;
  background-color: #afaf4c;
  border-radius: 5px;
  color: white;
  border: none;
  cursor: pointer;
}

.activityForm button:hover {
  background-color: #bebe51;
}
.activityForm p {
  border: #000 solid 1px;
  padding: 2px;
}
.activityForm .p1 {
  width: 310px;
}
.activityForm .p2 {
  width: 600px;
}
.activityForm span {
  color: #777;
}

@media (max-width: 1200px) {
  .activityForm {
    flex-direction: column;
    width: 100%;
    max-width: 95%;
    
  }
  .activityForm .p1 {
    width: 90%;
  }
  .activityForm .p2 {
    width: 90%;
  }
  .activityForm .p3 {
    width: 90%;
  }
  .activityForm .form-row {
    width: 100%;
  }

  .activityForm label {
    margin-left: 15px;
  }
  input#idInput, input#activityInput, input#noteInput {
    width: 90%; /* ให้ฟิลด์ยืดเต็มหน้าจอมือถือ */
    margin: auto;
  }
  #descriptioninput {
    width: 90%;
    resize: none;
  }
  .activityForm button {
    width: 200px; /* ปรับปุ่มให้เต็มหน้าจอในมือถือ */
    margin: auto;
  }
}

#switchkeymode {
  width: max-content;
}
#switchkeymode p {
  border: none;
  text-align: center;
  margin: 16px 0px 0px;
  padding: 0px;
}
.swkeymenu{
  float: left;
  width: 80px;
  padding: 3px;
  margin: 5px 10px;
  background-color: #c9c948;
  border: #646d11 solid 2px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 1px 6px 12px rgba(0,0,0,0.3);
  cursor: pointer;
}
.swkeymenu:hover{
  background-color: #cece44;
  border: #656b33 solid 2px;
  box-shadow: 1px 8px 12px rgba(0,0,0,0.3);
}


#scanform {display: block; width: 100%;}
#scancontener {width: max-content; margin: auto;}
#scantextin{width: 200px; text-align: center; padding: 30px 10px;}


#keyidform {
  width: 100%;
  max-width: 400px;
  margin: auto;
  font-size: 18px;
}
#keyidform label{
  width: 100%;
}
#keycontener {
  margin: auto;
  width: max-content;
}
#keyidmenu {
  border: #000 solid 1px;
  width: 242px;
  font-size: 18px;
  padding: 5px 0px;
  cursor: pointer;
}
#cancelsomekey {
  margin: 10px 0px 5px;
  cursor: pointer;
}
#savekeyidbt {
  background-color: #bebe51;
  border: #000 1px solid;
  border-radius: 4px;
  width: 80px;
  text-align: center;
  padding: 5px 8px;
  margin: 20px auto 10px;
  box-shadow: 2px 8px 12px rgba(0,0,0,0.3);
  cursor: pointer;
}
#savekeyidbt:hover {
  background-color: #c9c948;
}



/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ การแสดงคีย์ลัด */
#showkeys {
  background-color: #fff;
  border: solid 1px #000;
  border-radius: 5px;
  padding: 10px 5px;
  cursor: pointer;
}
#showkeyschkbx {
  width: max-content;
  max-width: 80vw;
  margin: 5px auto 10px;
}
#showkeyschkbx input[type="checkbox"] {
  margin: 0px 5px 0px 20px;
  width: 20px; /* กำหนดความกว้าง */
  height: 20px; /* กำหนดความสูง */
}
#showid {
  padding: 10px 0px 5px;
  margin: 10px 0px 0px;
  border-top: solid 1px #000;
}
#showid button{
  margin: 2px 3px;
  width: max-content;
  min-width: 50px;
  height: 30px;
}
#showactive {
  padding: 10px 0px 5px;
  margin: 10px 0px 0px;
  border-top: solid 1px #000;
}
#showactive button {
  width: max-content;
  min-width: 50px;
  height: 30px;
  margin: 2px 3px;
  cursor: pointer;
}

/*@media (max-width: 600px) {}*/

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ การแสดงข้อมูลในตาราง */
#datatabel {
  margin: 20px auto;
  width: 96%;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin: 5px 0px;
}

thead {
  background-color: #f4f4f4;
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #333;
  color: white;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #f1f1f1;
}

td {
  color: #555;
}

@media (max-width: 800px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  thead {
    display: none; /* ซ่อนหัวตารางในมือถือ */
  }

  tr {
    margin-bottom: 10px; /* เพิ่มระยะห่างระหว่างแต่ละข้อมูล */
    border: 2px solid #555;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    width: 96%;
  }

  td {
    display: flex;
    justify-content: flex-start;
    padding: 10px 0;
    border: none;
    border-bottom: 1px solid #ddd;
  }

  td:before {
    content: attr(data-label); /* ใช้ attribute data-label เพื่อแสดงชื่อคอลัมน์ */
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 20px;
    color: #333;
  }
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* ส่วนของ เมนูกรองค่า */
#filldt {
  margin: auto;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 100%; 
}

#filldt form {
  display: flex;
  flex-direction: column;
}

#filldt label, #filldt select, #filldt button {
  margin: 10px 10px 0px 10px;
  font-size: 16px;
  width: calc(100% - 20px);
}

#filldt button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 5px;
}

#filldt button:hover {
  background-color: #0056b3;
}

@media screen and (max-width: 600px) {
  #filldt {
    width: 90%;
    padding: 15px;
    margin: 10px auto;
  }

  #filldt label, select, button {
    font-size: 14px;
    margin: 8px 0;
  }

  #filldt button {
    padding: 8px;
  }
}


/* สไตล์ของปุ่มและส่วนต่างๆ */
.button-group {
  margin: auto;
  width: max-content;
}
.button-group button {
  padding: 10px 20px;
  margin: 5px;
  margin: auto;
  font-size: 16px;
}
.controlmode {
  width: 80%;
  min-width: 350px;
  margin: auto;
  padding: 10px;
  border: solid 1px #000;
  margin-top: 10px;
  text-align: center;
}
.batshow {
  margin: auto;
  padding: 10px;
  border: solid 1px #000;
}
.batshow button{
  margin: 4px;
  padding: 1px;
  font-size: 16px;
}
#mode2 button{
  width: 100px;
  margin: 20px 5px 0px 5px;
}
#mode3 input{
  width: 50px;
  margin: 0px 5px 0px 5px;
  text-align: center;
}
#mode3 button{
  width: 100px;
  margin: 20px 5px 0px 5px;
}
#section3 button{
  padding: 5px;
  text-align: center;
}
#showtimework1 {
  padding: 0px;
}
#mode4 input{
  width: 50px;
  margin: 0px 5px 0px 5px;
  text-align: center;
}
#mode4 button{
  width: 100px;
  margin: 20px 5px 0px 5px;
}

/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* เมนูหน้า Help*/
#helpmenu {width: 100%; max-width: 800px; margin: auto; 
             background-color: #faf283; border-radius: 10px;}
.helpmenu { width: max-content; margin: auto; cursor: pointer;}
.help-menu { width: max-content; background-color: #0000; 
             float: left; margin: 5px 10px; }
.help-menu-img{ width: 40px; margin: auto; }
.menuicon { width: 40px; height: 40px; }
.menu-text { margin: 0px;}






/*-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --*/
/* Section5*/

#addnewtransid_contener {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 94vw;
  height: 70vh;
  background: white;
  box-shadow: 0px 0px 20px rgba(0,0,0,0.3);
  z-index: 9999;
  border-radius: 10px;
  overflow-y: auto; /* ให้เลื่อนแนวตั้ง */
  padding: 50px 20px;
  border: #000 solid 1px;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
#addnewtransid_contener::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}


#formaddingarea {
  height: 100%;
  overflow-y: auto; /* ทำให้ scroll ได้เฉพาะเนื้อหาภายใน */
  padding-right: 10px;
}

/* ถ้าต้องการปิดพื้นหลังขณะ modal เปิด */
body.modal-open {
  overflow: hidden;
}

#formaddingarea {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  padding: 10px;
}

.forminput {
  display: flex;
  flex-direction: column;
}
.forminput input {
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.forminput select {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: white;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
#lotgendt2 {
  background-color: #fffec7;
}
#lotgendt12 {
  background-color: #fffec7;
}
.createdata_btout{
  flex: 1 1 100%;
  width: 100%;
  box-sizing: border-box; /* กัน padding ทำให้ล้น */
  grid-column: 1 / -1;
  width: 100%;
}
.createdata_bt {
  width: max-content;
  margin: 0px auto;
}
.transadd_bt{margin: auto; width: max-content;}
#transadd_bt {
  margin: 10px;
  width: 220px;
  height: 40px;
  border-radius: 4px;
  font-size: 20px;
  background-color: #ffef5d;
  box-shadow: 2px 1px 8px 1px #222222;
}#transadd_bt:hover {
  background-color: #fff493;
}


#createdata_bt {
  margin: 10px;
  width: 160px;
  height: 40px;
  border-radius: 4px;
  font-size: 20px;
  background-color: #f6e762;
  box-shadow: 2px 1px 8px 1px #222222;
}
#createdata_bt:hover {
  background-color: #e9da58;
}

#excreatedata_bt {
  margin: 10px;
  width: 160px;
  height: 40px;
  border-radius: 4px;
  font-size: 20px;
  background-color: #ff4c4c;
  box-shadow: 2px 1px 8px 1px #222222;
}
#excreatedata_bt:hover {
  background-color: #e66d6d;
}

#manual {
  width: 96%;
  height: 100vh;
  margin: auto;
}
#manualsheet {
  width: 100%;
  height: 100%;
}