@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@100;200;300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Doto:wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,9000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

 :root{
    --green: #4EAF58;
    --green-2: #00944D;
    --neutral: #72747D;
    --neutral-2: rgba(63, 64, 71, 1);
    --warning: rgba(202, 136, 40, 1);
    --warning-2: rgba(233, 175, 61, 1);
    --violet: rgba(100, 78, 177, 1);
    --violet-2: #382986;
    --danger: rgba(239, 76, 73, 1);
    --danger-2: rgba(255, 236, 232, 1);
    --danger-3: #B4262D;
    --success:#E8FFEE;
    --success2:#CBFFE0;
    --inprogress : #FFFFE7;
    --inprogress2: #FFF7A6;
    --used: #FFCDC6;
    --used-2: #D83A3A
}
html{
    font-family: "IBM Plex Sans Thai", serif;
}
.btn-button {
    box-shadow: 0px 4px 8px 0px rgba(186, 237, 0, 0.1);
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: 10px;
    cursor: pointer;
    margin-left: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}


 /* select */
.ui-select {
  position: relative;
  width: 140px;
  font-family: "IBM Plex Sans Thai", serif;
  user-select: none;
}

.ui-select-display {
  background: #fff;
  color: #333;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  border: 1px solid #B6B6B6;
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.2); */
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
   display: flex;
  justify-content: center; 
  align-items: center;    
  height: 55px;           
  text-align: center;    
}

.ui-select-display::after {
  content: url('../imgs/dropdown.svg'); 
  font-size: 14px;
  position: absolute;
  right: 10px; 
  top: 50%;
  transform: translateY(-50%);
  padding-right: 5px;
}

.ui-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #F8FDE6;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  max-height: 0; /* เริ่มปิด */
  overflow: hidden;
  transition: max-height 0.3s ease;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 99;
}

.ui-select-options li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.15);
  transition: background 0.3s;
}

.ui-select-options li:last-child {
  border-bottom: none;
}

.ui-select-options li:hover {
  background: #BAED00;
}




.dataTables_scrollHeadInner{
    /* background-color: #4eaf58; */
}

.dataTables_wrapper {
    width: 100%;
    border-bottom: 1px solid #E8EAF1;
    overflow-x: auto;  /* เปิดการเลื่อนแนวนอน */
}

#paginationControls {
    text-align: center;
    padding-top: 25px;
    padding-bottom: 25px;
    /* margin-top: 25px; */
}


 /* table */


table.dataTable {
    width: 100% !important;  /* บังคับให้ตารางเต็มหน้าจอ */
}




.dataTables_scrollBody
{
  position: static!important; /* ใช้ position: static หรือ relative เพื่อไม่ให้จำกัด tooltip */
    overflow: visible!important; /* อนุญาตให้เนื้อหาล้นออกมา */
}
.custom-border{
  position: relative;
  padding-left: 15px;
  padding-right: 15px;
}
.custom-border-th{
  position: relative;
  padding-left: 15px;
  padding-right: 15px;
}
.custom-border-td{
   position: relative;
  padding-left: 15px;
  padding-right: 15px;
}
.custom-border-th::after {
  content: '';
  display: block;
  height: 32px;
  border-right: 2px solid rgba(51, 51, 51, 1);
  position: absolute;
  top: 12px;
  right: 0;
}

.custom-border-td::after {
  content: '';
  display: block;
  height: 65px;
  border-right: 2px solid rgba(228, 228, 228, 1);
  position: absolute;
  top: 15px;
  right: 0;
}
.dataTables_scrollHeadInner .custom-border-td::after {
    content: '';
    display: block;
    height: 36px;
    border-right: 2px solid rgba(30, 30, 30, 1);
    position: absolute;
    top: 10px;
    right: 0;
}




.datatable  {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    color: #000;
    background: rgba(255, 255, 255, 1);
  width: 100%;
  border-radius: 10px;
  overflow: hidden; 
   border: none; 
    
}

.datatable thead tr {
  height: 55px;
  font-size: 16px!important;
  color:  rgba(51, 51, 51, 1);;    
  background: rgba(186, 237, 0, 1);
  box-shadow: 0px 4px 8px 0px rgba(186, 237, 0, 0.1);
}


.datatable thead {
    color: white;
}

.datatable th {
    /* padding: 10px; */
    text-align: left;
    font-weight: 500;
    color: rgba(44, 44, 48, 1);
}

.datatable tbody tr {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 4px 8px 0px #BAED001A;
    border-radius: 15px;
    height: 95px;
    font-size: 14px;
    font-weight: 300;
}

.datatable tbody td {
    padding: 15px;
    /* font-size: 18px; */
}

.datatable tbody td p {
   font-size: 14px;
}

.datatable  tr th:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding-left: 50px;
}

.datatable  tr th:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    text-align: center;
}

.datatable tbody tr td:first-child {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    padding-left: 20px;
}

.datatable tbody tr td:last-child {
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    text-align: center;
}

.datatable tfoot tr td:first-child {
    border-bottom-left-radius: 15px;   
        
}
.datatable tfoot tr td:last-child {
    border-bottom-right-radius: 15px;
}





.datatable tfoot tr{
  background-color: rgba(255, 255, 255, 1);
  box-shadow: none!important;
  height: 75px;
  align-items: center;
}


.pagination-info {
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

.pagination-buttons {
  text-align: center;
  margin-top: 5px;
}

.pagination-buttons button {
  margin: 0 3px;
  padding: 5px 10px;
  border: 1px solid #BAED00;
  background: #fff;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.pagination-buttons button:hover {
  background: #BAED00;
  color: #fff;
}

.pagination-buttons button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-pagination{
    background: #BAED00;
    width: 40px;
    height: 37px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-family: "Roboto", sans-serif;
}


div:where(.swal2-container) div:where(.swal2-popup){
  /* background-color: transparent!important; */
}
div:where(.swal2-container) div:where(.swal2-loader){
  border-color: rgba(186, 237, 0, 1) rgba(0, 0, 0, 0) rgba(186, 237, 0, 1) rgba(0, 0, 0, 0)!important;
}

.opdis{
  opacity: 20%;
  pointer-events: none;
}

.btn_paging{
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
}

 .date-box {
    padding: 20px 10px!important;
    text-align: center!important;
    height: 22px;
    width: 260px;

  }

  /* -------- Custom Daterangepicker Style -------- */
  .daterangepicker {
    border-radius: 15px !important;
    background: #fff !important;
    border: none !important;
    box-shadow: 0px 15px 30px 0px #BAED0026;

  }

  .daterangepicker .drp-calendar {
    padding: 15px !important;
    max-width: none!important;
  }

  .daterangepicker .calendar-table {
    border: none !important;
  }

  .daterangepicker td.available:hover {
    background-color: rgba(210, 255, 0, 0.2) !important;
  }

  .daterangepicker td.in-range {
    background-color: rgba(210, 255, 0, 0.3) !important;
    color: #000 !important;
  }

  .daterangepicker td.active,
  .daterangepicker td.active:hover {
    background-color: #BAED00 !important;
    color: #000 !important;
    font-weight: bold!important;
  }

  .daterangepicker .drp-buttons {
    border-top: none !important;
    padding: 10px 15px !important;
  }

  .daterangepicker .drp-buttons .btn {
    border: none !important;
    font-weight: 300!important;
    border-radius: 8px !important;
    transition: 0.2s!important;
    font-size: 14px!important;
    font-family: "IBM Plex Sans Thai", serif !important;
    padding: 7px 16px!important;
    cursor: pointer!important;
  }
 .btn-default{
    background-color: #FF6F61!important;
     color: white !important;
  }
  .btn-primary{
    background: #BAED00 !important;
    color: #000 !important;
  }

  .daterangepicker .drp-buttons .btn:hover {
    background: #eaff66 !important;
  }

  .daterangepicker .drp-selected {
    color: #000 !important;
     font-family: "IBM Plex Sans Thai", serif !important;
     display: none!important;
  }

  .daterangepicker .calendar-table th {
    color: #b5d62f !important;
    font-weight: normal !important;
      font-family: "IBM Plex Sans Thai", serif !important;

  }
.daterangepicker .calendar-table th, .daterangepicker .calendar-table td {
    font-family: "IBM Plex Sans Thai", serif !important;
    font-size: 15px!important;
}

.daterangepicker td.active, .daterangepicker td.active:hover
{
    font-weight: 400!important;
    width: 30px!important;
    height: 30px!important;
}

.daterangepicker td.start-date{
    border-radius:  8px !important;
}
.daterangepicker td.end-date{
    border-radius:  8px !important;
}
.daterangepicker td.in-range {
    background-color: rgba(210, 255, 0, 0.3) !important;
    border-radius: 8px !important;     
    
}
.daterangepicker td.in-range:before {
    content: none !important;
    display: none !important;
}

.daterangepicker td.in-range:before {
    content: none !important;
    display: none !important;
}

.daterangepicker table {
    border-collapse: separate !important; 
    border-spacing: 4px !important;    
}


.daterangepicker td.end-date {
    background-color: #BAED00 !important;
    border-radius: 8px !important;
}

.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date{
    background-color: #F6F6F6!important;
    border-color: transparent!important;
    color: #C3C3C3!important;
    border-radius: 8px!important;
    width: 30px!important;
    height: 30px!important;
}

.daterange-input{
    border: none!important;
    outline: none!important;
    cursor: pointer!important;
    transition: 0.3s!important;
    color: #333333!important;
    font-size: 14px!important;
    font-family: "IBM Plex Sans Thai", serif !important;
}

.button {
   height: 53px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    cursor: pointer;
    padding: 6px 15px;
    border-radius: 18px;
    border: 1px solid #E4E4E4;
    box-shadow: 0px 4px 8px 0px #BAED001A;
    font-weight: 400;
    width: 175px;
    cursor: pointer;
}
.button-sm {
   height: 53px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    cursor: pointer;
    padding: 10px;
    border-radius: 15px;
    border: 1px solid #E4E4E4;
    box-shadow: 0px 4px 8px 0px #BAED001A;
    font-weight: 400;
    cursor: pointer;
}
.button:hover{
  background: #F5FCD9;
  border: 1px solid #BAED00;
}
.button img {
  margin-right: 5px;
}

.input {
  height: 55px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 15px;
 border: 1px solid #B6B6B6;
}

.inputborder {
  border: none;
  height: 38px;
  font-weight: 300;
}

input::placeholder{
  font-size: 16px;
  font-weight: 0!important;
  color: #333333;
  font-family: "IBM Plex Sans Thai", serif !important;
}

.radio-toolbar{
  display: flex;
  gap: 5px;
}

.radio-toolbar input[type="checkbox"] {
  display: none;
}

.radio-toolbar label {
  display: inline-block;
  /* background-color: #ddd; */
  padding: 0px 5px;
  cursor: pointer;
  height: 30px;
}

.radio-toolbar label img {
  width: 30px;
}

.radio-toolbar input[type="checkbox"]:checked+label {
  /* background-color: #bbb; */
}
.radio-toolbar input[type="checkbox"]:not(:checked) + label 
{
 opacity: 30%;
}


.tooltip-wrapper {
  position: relative;
  display: inline-block;
  font-family: sans-serif;
}

.tooltip-label {
  font-weight: bold;
  cursor: pointer;
}

/* .tooltip-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #eef8c0;
  padding: 6px 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
} */

.tooltip-content::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #eef8c0 transparent;
}

.tooltip-wrapper:hover .tooltip-content {
  opacity: 1;
  pointer-events: auto;
}
.tooltip-wrapper:hover .tooltip-content-status {
  opacity: 1;
  pointer-events: auto;
  z-index: 9;
}

.roboto {
    font-family: "Roboto", sans-serif;
}
.head-point-item{
    height: max-content;
    background-color: gray;
    border-radius: 20px 20px 0px 0px;
}
.text-green{
    color: var(--green);
}
.text-neutral{
    color: var(--neutral);
}
.text-warning{
    color: var(--warning);
}

  .maxpoint{
      background: rgba(255, 255, 231, 1) !important;
      padding: 20px;
  }


.text-head {
  font-weight: 500;
  font-size: 18px;
}

.text-gray{
  color: rgba(139, 139, 139, 1);
    font-weight: 500;
      font-size: 20px;

}

.text-title {
  font-weight: 600;
  font-size: 28px;
}

.btn-foot{
    padding: 10px;
    font-weight: 400;
}

.card-point{
    display: flex;        
    gap: 16px;
    height: max-content;
}
.card-point-item{
    width: unset !important;
    width: 33%;
    max-width: 353px;
    flex: 1;
    border-radius: 20px;
    border: 1px solid #EDEFF5;
    box-shadow: 0px 4px 8px 0px #8E8E8E14;
    min-height: max-content;
    margin:0px 10px;
}
.card-point-reward{
    width: unset !important;
    width: 33%;
    max-width: 253px;
    flex: 1;
    border-radius: 20px;
    border: 1px solid rgba(237, 239, 245, 1);
    box-shadow: 0px 4px 8px 0px rgba(142, 142, 142, 0.08);
    min-height: max-content;
    margin:0px 10px;
}

.card-point-item-2{
    /* flex: 1; */
    border-radius: 16px;
    border: 1px solid rgba(237, 239, 245, 1);
    box-shadow: 0px 4px 8px 0px rgba(142, 142, 142, 0.08);
    min-height: max-content;
    margin:10px;        
    width: 100%;
    max-width: 255.5px;
}

.box-card{        
    /* flex: 1; */
    border-radius: 16px;
    border: 1px solid rgba(237, 239, 245, 1);
    box-shadow: 0px 4px 8px 0px rgba(142, 142, 142, 0.08);
    min-height: max-content;
    margin:10px 0px;        
    width: 100%;
    max-width: 255.5px;
}

  .container-shadow{        
    border-radius: 24px;
    width: 100%;        
    height: 100%;
    background-color: rgba(255, 255, 255, 1);
   box-shadow: 0px 4px 8px 0px #BAED001A;
   padding: 20px;
    margin-bottom: 20px;
}

 .container-body{        
  width: 100%;
  height: 100%;  
  display: flex;
  flex-direction: row;              
}   
  .container-second{
      width: 100%;
      padding: 0px 10px;
      /* overflow: scroll; */
  }  
  
  label{
    margin-bottom: 0px!important;
  }

  .text-page-title{
    color: #8F8F8F;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 15px!important;
  }

main {
    flex: 1;
    height: 100vh;
    /* overflow: scroll; */
    /* overflow-y: scroll; */
    /* overflow-x: auto; */
    background-color: #F8FAFC;
    transition: margin-left 1s ease;
    /* box-shadow: 0px 8px 16px 0px #BAED001A; */

}

.container-menu-head{
    z-index: 2;
    display: flex;
    align-items: center;
    /* position: sticky; */
    top: 0px;
    gap: 10px;
    width: 100%;        
    height: 108px;
    max-width: 100vw;
    padding: 32px 0px 32px 0px;
    overflow-x: scroll;
    overflow-y: hidden;
    padding: 0px 10px;
    justify-content: space-between; 
    padding-left: 10px; 
    padding-right: 20px;
}
.modal-content {
    height: 100%;
    /* width: 100%; */
    border-top-left-radius: 30px!important;
}

  .modal-backdrop
  {
    z-index: 1!important;
  }


  .modal {
    display: none;
    position: fixed;
    z-index: 99;
    padding-top: 10px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
  }

  /* Modal Content */

  .modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
    border-radius: 8px;
  }

    .modal2.active {
    pointer-events: auto;
    top: 0;
    z-index: 100;
  }

  .modal2.active>.backdrop {
    opacity: 0.5;
  }

  .modal2.active>.content {
    top: 0%;
  }




.modal {
    padding-top: 0px !important;
}

.modal-dialog {
    position: fixed!important;
    margin: auto!important;
    width: 100%!important;
    height: 100%!important;
    right: 0px!important;
}

.modal-header-normal{
height: 350px!important;
display: flex;
    -ms-flex-align: start;
    align-items: flex-start;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 1rem 1rem;
    height: 380px;
    background-size: cover;
    background-color: #D9D9D9;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(.3rem - 1px);
    border-top-right-radius: calc(.3rem - 1px);
}


p {
  margin-bottom: 10px!important;
}

.ui-select-display p {
  margin-bottom: 0px!important;
}

.modal-body{
 padding: 0px!important;
}

.inputborder::placeholder{
  color: #E4E4E4;
}

.swal2-popup {
  position: fixed !important; /* ใช้ position fixed */
  top: 50% !important; /* ตั้งค่าให้ modal อยู่ตรงกลาง */
  left: 50% !important;
  transform: translate(-50%, -50%) !important; /* ปรับตำแหน่ง */
  z-index: 9999 !important; /* ใช้ z-index ที่สูงกว่า */
      padding: 10px;
  border-radius: 20px;
  width: 395px;
}



.swal2-cancel {
    background-color: #FF6F61 !important;
    color: #FFFFFF !important;
    border-radius: 5px;
    width: 110px;
    height: 55px;
    font-size: 16px;
    border-radius: 10px;
}

/* ปรับแต่งปุ่ม "ยืนยัน" */
.swal2-confirm {
    background-color: #BAED00 !important;
    color: #333 !important;
    border-radius: 5px;
    width: 110px;
    height: 55px;
    font-size: 16px;
    border-radius: 10px;
}

/* ปรับแต่งข้อความ */
.swal2-title {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
}

.swal2-html-container {
    font-size: 16px;
    color: #555;
    font-weight: 200;
    padding: 0px;
}

.swal2-popup {
position: fixed !important; /* ใช้ position fixed */
top: 50% !important; /* ตั้งค่าให้ modal อยู่ตรงกลาง */
left: 50% !important;
transform: translate(-50%, -50%) !important; /* ปรับตำแหน่ง */
z-index: 9999 !important; /* ใช้ z-index ที่สูงกว่า */
    padding: 10px;
border-radius: 20px;
width: 395px;
}

div:where(.swal2-container).swal2-center>.swal2-popup{
    padding: 0px;
    border-radius: 32px;
}

.swal-text-head {
  font-size: 24px;
    font-weight: 500;
    color: #4EAF58;
    margin-bottom: 20px;
    margin-top: 20px;
}

.swal-text-title {
  font-size: 16px;
   margin-bottom: 20px;
}

.boxpoint {
    border: 2px solid #F6F6F6;
    background: #FFFFFF;
    height: 300px;
    border-radius: 30px;
    margin-top: 30px;
}


  .discount-container {
    /* background: #fff; */
    /* border-radius: 15px; */
    padding: 15px 10px;
    width: 90%;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
  }


  .discount-header {
 
    /* border: 1px solid #f0f0f0; */
    border-radius: 15px;
    /* padding: 10px 15px; */
    /* margin-bottom: 15px; */
    /* background: #fffdf6; */
  }

  .discount-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    /* font-weight: 500; */
    /* color: #ff9800; */
    justify-content: space-between;
  }

  .discount-header-right {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    align-items: center;
    gap: 8px;
  }

  .minus-btn {
    /* background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    outline: none; */
  }
[type=button]:not(:disabled), [type=reset]:not(:disabled), [type=submit]:not(:disabled), button:not(:disabled){
  outline: none;
}

  .discount-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .option {
    display: flex;
    align-items: center;
    border-radius: 15px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .option:hover {
    border-color: #a0e67a;
  }

  /* ซ่อน radio ดั้งเดิม */
  .option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border: 2px solid #333;
    border-radius: 50%;
    position: relative;
    margin-right: 12px;
    cursor: pointer;
    outline: none;
  }

  /* เมื่อเลือกแล้วให้เป็นวงในสีเขียว */
  .option input[type="radio"]:checked {
    border-color: #333;
  }

  .option input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: #b5ff32; /* สีเขียวอ่อนตามภาพ */
    border-radius: 50%;
  }

  /* เมื่อเลือกแล้ว แถวจะเปลี่ยนสีพื้นหลังนวลๆ */
  .option input[type="radio"]:checked + label {
    /* background-color: #f5ffec; */
    border-radius: 10px;
  }


    .option label {
    flex: 1;
    cursor: pointer;
    padding: 4px 0;
  }

  .option strong {
    color: #000;
    font-weight: 600;
  }

  .points {
    color: rgba(255, 204, 102, 1);
    font-weight: 600;
  }
  
  .points.inactive{
    color: rgba(88, 88, 88, 1);
  }
  
  .tabs {
    display: flex;
    align-items: flex-end;
    width: fit-content;
  }

  .tab {
    padding: 18px 45px;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    cursor: pointer;
    background-color: #f1f1f1;
    color: #777;
    font-weight: 500;
    transition: 0.3s;
    user-select: none;
  }



  .tab.active {
    background-color: #fff;
    color: #a6d835;
    border: 1px solid #ddd;
    border-bottom: none;
    font-weight: 600;
  }

  .tab:not(.active):hover {
    background-color: #e9e9e9;
  }

  .tab-content {
 
  }

  .tab-pane {
    opacity: 0;
    transform: translateY(10px);
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
  }

  .tab-pane.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
  }



.card-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 16px;
  width: 95%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.header span {
  font-weight: bold;
}


.card-list.closed {
  max-height: 70px;
}

.card-item {
  /* display: flex; */
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 8px;
  transition: border 0.3s, background 0.3s;
}

.card-item.active {
  border-color: #b6ef70;
  background: #f8fff0;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-left img {
  width: 75px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.card-actions i {
  cursor: pointer;
}

.radio {
  accent-color: #b6ef70;
}

.new-card {
  border: 1px dashed #ccc;
  justify-content: flex-start;
}

.toggle {
  font-size: 14px;
  color: #777;
}

.text-credit {
  font-size: 19px;
  font-weight: 600;
}

.toggle-el {
  padding: 2rem;
  height: 180px;
  /* background: white; */
  transition: all 0.2s ease;
  opacity: 1;
  height: auto;
}
/* input[type="checkbox"].hide-input:checked + div.toggle-el {
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}


div.toggle-el:has(+ input.hide-input:checked)::after  {
  height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}


input.hide-input {
  position: absolute;
  left: -999em;
}
label.toggle:has(+ input.hide-input:checked)::after {
  content: '-';
  background: rgba(255, 111, 97, 1);
  color: #fff ;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  width: 35px;
  height: 35px;
}
label.toggle::after {
  content: '+'; 
  color: rgba(0, 0, 0, 1);
}


label.toggle {
  text-align: center;
  display: flex;
  cursor: pointer;
  font-size: 21px;
  color: #242424;
  background: rgba(186, 237, 0, 1);
  border-radius: 30px;
  user-select: none;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  position: relative;
}
 */

 .discount-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; 
  position: relative;
}

.discount-header-left img {
  width: 35px;
  height: auto;
}

.discount-header-left span,
.discount-header-left label {
  font-size: 18px;
}

.discount-header-left label.toggle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #BAED00;
  display: flex;
  color: white;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 21px;
  user-select: none;
  font-weight: 100;
}

 .toggle-el {
  width: 100%; 
  /* overflow: hidden; */
  max-height: 0;
  opacity: 0;
  transition: all 0.3s ease;
  padding: 0;
}

.toggle-el.open {
  max-height: 500px; 
  opacity: 1;
  /* padding: 10px 0; */
}




/* ซ่อน checkbox จริง */
input.hide-input {
  display: none;
}



/* ใช้ ::after แสดง + */
label.toggle.minus-btn::after {
  content: '+';
}

/* เมื่อ checkbox ถูกเช็ค */
input.hide-input:checked + label.toggle.minus-btn {
  background: red;       /* เปลี่ยนสี */
  color: #fff;           /* สีตัวอักษร */
}

/* เปลี่ยนสัญลักษณ์ + เป็น – */
input.hide-input:checked + label.toggle.minus-btn::after {
  content: '-';
  font-size: 45px;
  font-weight: 100;
}


.option {
  padding: 15px;
  border-radius: 15px;
  /* margin-bottom: 5px; */
  transition: all 0.3s;
  /* border: 1px solid rgba(182, 182, 182, 1); */
}

.discount-options  .option {
    border: 1px solid rgba(182, 182, 182, 1);
}

div.dataTables_wrapper div.dataTables_info{
  display: none;
}

.dataTables_scrollFoot .custom-border-td::after{
  border: 0px;
}


/* กล่องตอน empty */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
}

.empty-state img {
  width: 120px;
  margin-bottom: 20px;
}

.empty-state h3 {
  color: rgba(255, 111, 97, 1);
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: #333;
  font-size: 14px;
}

/* loading */
.loading-state {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ddd;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeInUp .35s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dt-empty,
.dt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
}

.dt-empty img {
  width: 120px;
  margin-bottom: 16px;
}

.dt-empty h3 {
  color: #ff6b5a;
  font-weight: 600;
  margin-bottom: 12px;
}

.btn-reset {
  border: none;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
}

/* loading */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #ddd;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* บังคับ empty row ให้เต็มตาราง */
table.dataTable td.dataTables_empty {
  text-align: center;
  padding: 0 !important;
}

table.dataTable td.dataTables_empty > div {
  width: 100%;
}

/* ทำให้กินทุก column */
table.dataTable td.dataTables_empty {
  colspan: 1000;
}

table.dataTable td.dataTables_empty > div {
      background-color: rgba(249, 249, 249, 1);
}

.empty-table-state{
  background: rgba(255, 255, 255, 1);
    box-shadow: 0px 4px 8px 0px rgba(142, 142, 142, 0.08);
    border-radius: 30px;
    width: 350px;
    padding: 20px;
    margin-top: 14px;
}

.dataTables_processing .spinner {
  border-top-color: rgba(186, 237, 0, 1) !important; /* สีส้ม/แดง */
}

/* เปลี่ยนสีจุด loading เฉพาะตอน processing */
table.dataTable.processing + div.dataTables_processing > div > div {
  background-color: rgba(186, 237, 0, 1) !important;
}
.dt-empty div,
.dt-empty span {
  background: transparent !important;
}

/* วงกลมใหญ่ (background ของ loading) */
table.dataTable.processing + div.dataTables_processing > div {
  background: rgba(186, 237, 0, 0.2) !important; /* เขียวอ่อน */
  border-radius: 50%;
  padding: 20px;
}

/* จุดเล็ก ๆ */
table.dataTable.processing + div.dataTables_processing > div > div {
  background-color: rgba(186, 237, 0, 1) !important; /* เขียวเข้ม */
}


#mySearchBox{
    width: 200px;
}
#mySearchBox {
    position: relative;
    display: flex;
    align-items: center;
}

#mySearchBox input {
    width: 100%;
    padding-right: 45px; 
    height: 40px;
}

#mySearchBox img {
    position: absolute;
    right: 10px;
    width: 24px;
    height: auto;
    pointer-events: none; 
}


input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

div.dataTables_processing>div:last-child>div{
  background: rgba(186, 237, 0, 1)!important;
}

div.dataTables_processing{
  border: none!important;
  background-color: transparent!important;
}

div[data-position-only] {
  display: none;
}

.maybe_scroll{
  padding-left: 20px;
}