

@font-face {
  font-family: myFont;
  src: url('../css/font/IBMPlexSansThai-Regular.ttf'),url('../css/font/IBMPlexSansThai-Regular.woff');
}

body{
    background-color: #ffffff;
    font-family: myFont;
}

/* SIDEBAR */
.sidebar{
    background-color: #18133D;
    width: 250px;
    top: 4px;
    bottom: 4px;
    left: 4px;
    z-index: 1;
    position: fixed;
    border-radius: 10px;
    overflow: hidden;
    font-weight: 700;
    transition: 0.5s;
}
.sidebar .menu{
    margin-top: 5%;background-color: none;
    
}
.sidebar .menu a{
    margin: 10px 5px 0 5px;
    height: 60px;
    padding-left: 15px;
    text-decoration: none;
  font-size: 18px;
  display: block;
  /* transition: 0.3s; */
    background-color:none ;
    color: #ffffff;
    display: flex;
    align-items: center;
    border-radius: 10px;
    white-space: nowrap;
}
.sidebar .menu a:hover{
    background-color: #AFA9E0;
    color: #18133D;
}
.sidebar .menu img{
    background-color: none;
    width: 40px;
    height: auto;
    margin-right: 10px;
}

.sidebar .headerbar img{
    width: auto;
    height: 55px;
}
.sidebar .headerbar{
    display: flex;
    justify-content: center;
    padding: 15px;
}
.sidebar .icon{
    position: absolute;
    text-decoration: none;
    height: 100%;
    right: 0;
    background-color: #AFA9E0;
    font-size: 20px;
    color: #18133D;
     display: flex;
    align-items: center;
    padding: 10px;
}
.logout{
    
    background-color:none;
      display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100%;

  
  
}
.logout img{
    width: auto;
    height: 20px;
    margin-right: 5px;
}
.logout a{
    font-size: 14px;
    text-decoration: none;
    background-color: #BC2424;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.logout a:hover{
    background-color: #8d1a1a;
}

.togglebtn{
    transition: 0.5s;
    position: fixed;
    margin-left: 260px;
}
.togglebtn img{
    background-color: #AFA9E0;
    width: 40px;   
    border-radius: 10px;
    padding: 5px;
}
.togglebtn img:hover{
    background-color: #756fa2;

}


/* CONTENT */
.content{
    margin-left: 270px;
    transition: 0.5s;
}

/* INDEX */
/* HEADER */
.header{
    display: flex;
    align-items: center;
    background-color: rgb(0, 53, 102);
    margin-top: 5px;
    margin-bottom: 5px;
   padding: 15px;
   border-radius: 10px;position: relative;



}
.header2{
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
}
.showwork{
    align-items: center;
    --bg-offset: 0%;
  display: flex;
  overflow: hidden;
  position: relative;}
.showwork > a{
    align-items: center;display: flex;justify-content: center;
height: 40px;
  padding: 10px;
  background: transparent;
  cursor: pointer;
  background-color: #d2d2d2;
  margin-right: 10px;
}
.showwork a:hover{
    text-decoration: none;
    background-color: rgb(193, 225, 255);
}
.showwork > a:not(:last-of-type) {
  border-right: 1px solid #eee;
}.showwork .btn.active {
   background-color: rgb(0, 112, 218);
   color:white;

}



.headtext{
    font-size: 24px;
    font-weight: bold;
    color: white;   position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.headname{

    background-color: rgb(3, 0, 20);
padding: 10px;
border-radius: 10px;
align-items: center;display: flex;
margin-right: 0px;
margin-left: auto;
transition: 0.2s;
}
.headname:hover{
    background-color: #495057;
    
}
.headname span{
padding-left: 10px;
    font-size: 24px;
    font-weight: bold;
color: white;
}
.headname:hover .userlogo{
    display: none;
    
}
.userlogo{
    width:45px;height:auto;
}
.userlogout{
    padding: 7px;
    width:45px;height:auto;
}
.headname:hover .userlogout{
    display: block !important;
    cursor: pointer;
}
.header-detail {
    display: flex;
    align-items: center;
    padding: 7px;
    gap: 20px;

}
.header-detail span{
    display: flex;
    align-items: center;
    height: 40px;
    width: auto;
}
.colorblock{
    width: 70px;
    padding: 5px;
    text-align: center;
align-items: center;
    display: block;
    border-radius: 5px;
}.btnstatus:hover {
    opacity: 0.7;
    transform: scale(1.05);
    box-shadow: 0px 2px  rgb(7, 0, 54);
}
.secondheader{
  display: flex;
  justify-content: space-between;
  align-items: center;
    background-color: rgb(7, 84, 156);
    padding: 0px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.status{
    background-color: #899fc0;
    margin-left: 2%;
    font-weight: bold;
    font-size: 16px;
    padding: 20px;
    border-radius: 10px;
}
.btnadd{
background-color: #18133D;
margin-right: 5px;
border-radius: 10px;
overflow: hidden;
}
.btnadd a{
    color: white;
    padding: 10px;
}
.btnadd a:hover{
    text-decoration: none;
}
.btnadd:hover{
background-color: #756fa2;
}
.btnadd img{
    width:50px;
    height: auto;
    padding: 5px;
}
.seacrhbtn{
    margin: 10px;
}
.headertext{
    background-color: #ffc107;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
   border-radius: 5px;
    margin-bottom: 5px;
    font-weight: bold;
}
.headertextadd{
    background-color: #00ff00;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    font-weight: bold;
}

/* TABLE */
.table thead tr a {
    color: #005eff;
    pointer-events: auto;
    cursor: pointer;
    text-decoration: underline;

    padding: 5px;
    border-radius: 5px;
}
.table thead tr a:hover {
    color: #5500ff;
}
.tableclass th{
    font-weight: bold;
    background-color: #d3ddec;
}

.table thead th {
vertical-align: middle; 
}
.btnview{
    margin-right: 10px;
    width: 25px;
    height: auto;
    border-radius: 100px;
}
.btnview:hover{
background-color: #43009A;
}
.btnedit{
    margin-right: 10px;
    width: 25px;
    height: auto;border-radius: 2px;
}
.btnedit:hover{
    background-color: #18133D;
}
.btndelete{
    width:25px;
    height: auto;
    cursor: pointer;
    border-radius: 100px;
}
.btndelete:hover{
    background-color: #80000F;
}

.changestatusgrid{
    border-radius: 5px;display:flex;justify-content: center;padding: 2px;font-weight: bold;
}
.optionstatus{
    border-radius: 5px;display:flex;padding: 2px;
}
/* .status-selected-100 { background-color: rgb(183, 255, 183) ; color:rgb(0, 168, 0);}
.status-selected-200 { background-color: rgb(206, 243, 244)  ;color: rgb(0, 141, 144);}
.status-selected-300 { background-color: rgb(220, 193, 237)  ;color:rgb(157, 0, 255);}
.status-selected-400 { background-color: rgb(239, 216, 169)  ;color:rgb(255, 154, 47);}
.status-selected-500 { background-color: rgb(193, 176, 249)  ;color:rgb(98, 72, 183);}
.status-selected-600 { background-color: rgb(196, 196, 196) ;color:rgb(91, 91, 91); }
.status-selected-700 { background-color: rgb(192, 181, 255) ; color: #4129C7;}

.status-option-100 { background-color: rgb(183, 255, 183) ; color:rgb(0, 168, 0); }
.status-option-200 { background-color: rgb(206, 243, 244)  ;color: rgb(0, 141, 144); }
.status-option-300 {background-color: rgb(220, 193, 237)  ;color:rgb(157, 0, 255); }
.status-option-400 {  background-color: rgb(239, 216, 169)  ;color:rgb(255, 154, 47); }
.status-option-500 { background-color: rgb(193, 176, 249)  ;color:rgb(98, 72, 183); }
.status-option-600 { background-color: rgb(196, 196, 196) ;color:rgb(91, 91, 91); }
.status-option-700 { background-color: rgb(192, 181, 255) ; color: #4129C7;} */



/* VIEWS */
.worktypeview{
    color:#1377e2;font-weight:normal;
}
.mainnameview{
    
    padding: 7px;
    font-size: 28px;
    border-radius: 5px;
    color: black;
}
.mainnameview:hover{

    text-decoration: none;
    color: black;
}
.detailup{
    color: red;
    width: 200px;
    margin-right: 10px;
}
.editinview{
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 15px;
}
.editinview a{
    margin-right: 0px;
    margin-left: auto;
    width: fit-content;
}
.searchsub{
    background-color: #ebebeb;
    display: flex;
    margin-left: 20px;
    border-radius: 5px;
    padding: 7px;
}
.searchsubcus{
    background-color: #ebebeb;
    display: flex;
    border-radius: 5px;
    padding: 7px;
}
.detailsviews{
    background-color: #f8f8f8;
    border-radius: 5px;
    padding: 10px;
}
.detailshead{
    display: flex;
}

.topright{
    margin-right: 0px;
    margin-left: auto;
    display: flex;
}
.toprightmodal{
    display: flex;
    position: absolute;
    right: 0;
}
.editcount{
   margin-right: 30px;
    width: fit-content;
}
.dropbtn{
    margin-right: 60px;
}
.dropbtn .btn{
    width: 45px;
    height: 35px;
    background-color: #CFC9FF;
}
.backicon{
    height: fit-content;
}
.backicon:hover{
    background-color: #8d1a1a;
    border-radius: 100%;
}
.detailscontent{
    font-size: 16px;
}
.detailshead{
    background-color: #eeeeee;
}
.topcontent{
    display: flex;
    justify-content: space-between;

}

.editicon {
    display: flex;
    padding: 3px;
    border-radius: 5px;
}
.editicon:hover{
    background-color: #18133D;
}
.editicon img{
    width: 35px;
    height: auto;
}
.mainwork{
    margin-bottom: 10px;
}
.mainwork h6{
    font-weight: bold;

}
.bodycontent{
    margin-top: 20px;
    margin-left: 20px;
}
.blockcontent{
    margin-bottom: 10px;
    background-color: #ebebeb;
    padding: 5px;
    border-radius: 10px;
}
.footercontent{
    display: flex;
    margin-left: 20px;
    margin-top: 20px;
    gap: 100px;
}

.subhead{
    background-color: #eeeeee;
    padding-top: 30px;
}
.subcard:hover{
    background-color: #eeeeee;
    cursor: pointer;

}
.subwork{
    font-size: 14px;
}
.subwork h6{
    font-weight: bold;
    overflow: hidden;
    white-space: normal;
}

.marginB15{
    margin-bottom: 25px;
}
.subsec{
    margin-bottom: 15px;
}

.substatus{
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    border-radius: 10px;
    width: fit-content;
}
.statusblock{
    border-radius:5px;padding:4px;
}
.textoverflow{
   height: 70px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* แสดงไม่เกิน 3 บรรทัด */
  -webkit-box-orient: vertical;
  background-color:#ebebeb ;
      padding: 7px;
    border-radius: 10px;
}

.price{
    position: absolute;
    right: 200px;
    bottom: 10px;
    border: solid 1px;
    padding: 5px 7px 5px 7px;
    border-radius: 2px;
}
.price span{
    background-color: #ebebeb;
    width: 100%;
    display: flex;
    border-radius: 2px;
    padding: 2px;
    justify-content: end;
}
/* MODAL */
.modalcontenttop{
    display: flex;
}
.modalcontentsecond{
    display: flex;
    align-items: center;
}
.modalcontentmid{
    margin-top: 20px;
    margin-left: 20px;
}
.modalviewstop{
    display: flex;
    align-items: center;
}
/* EDIT */
.uptomain{
    padding: 5px;
    background-color: #d7d2ff;
    border-radius: 5px;
    color: black;
}
.uptomain:hover{
    text-decoration: none;
    background-color:#ada7dd ;
    color: black;
}
.headedit{
    display: flex;
    justify-content: space-between
}
.mainedit{
    background-color: rgb(243, 243, 243);
    border-radius: 5px;
    margin-bottom: 10px;
}

.sectopinput{
    display: flex;
    justify-content: space-between;
    height: 100px;
    margin-bottom: 10px;
}

.secondinput{
    display: flex;
    margin-bottom: 10px;
}
.blocksecond{
    margin-right: 80px;
}
.midinput{
    margin-bottom: 10px;
}
.hide{
    display: none;
}
.dateBar{
    display: flex;
}
.blockdate{
    margin-right: 40px;
    width: 120px;
    margin-bottom: 10px;
}

.btnsave{
    margin-right: 0;
    margin-left: auto;
}
.footeredit{
    display: flex;
    margin-top: 10px;
    margin-bottom: 10px;
}
.topsub{
    display: flex;
    align-items: start;
    margin-bottom: 10px;
}
.btnsubdel{
    margin-right: 0;
    margin-left: auto;
    cursor: pointer;
}
.btnsubdel:hover{
    background-color: #8d1a1a;
    border-radius: 100%;
    height: fit-content;
}
.returnsub{
    background-color: #18133D;
    display: flex;
    align-items: center;
    padding: 5px;
    margin-bottom: 10px;
    border-radius: 10px;
}
.btnbacksub{
    margin-right: 0px;
    margin-left: auto;
}

/* MODAL UPDATE */
.modalupdatetop{
    display: flex;
    margin-bottom: 15px;
    justify-content: space-between;
    gap: 10px;
}
.modalupdatesecond{
    display: flex;
    margin-bottom: 15px;
    gap: 60px;
}

.modalupdatedate{
    display: flex;
margin-top: 15px;
}
.modalblockdate{
    width: 120px;
    margin-right: 50px;
}


/* REPORT */
.selectreport{
    background-color: #899fc0;
    padding: 15px;
    border-radius: 5px;

}
.reportlist{
    margin-bottom: 15px;  
}
.reportcard{
    border-radius: 10px;
    height: 50px;
    justify-content: center;
    display: flex;
    padding: 10px;
}
.reportcard:hover{
    background-color: #bdbdbd;
}
.searchreport{
    margin-left: 2%;
    font-weight: bold;
    font-size: 16px;
    padding: 20px;
    border-radius: 10px;
}
.reportchbar{
    border-radius:10px;padding:5px;align-items:center;margin-top: 10px;
}

/* REPORTVIEWS */
.topviewre{
    display:  flex;
    gap: 100px;
}
.topviewre h6{
    font-weight: bold;
}
.secviewre{
    display:  flex;
    gap: 100px;
    margin-bottom: 10px;
}
.secviewre h6{
    font-weight: bold;
}
.detailviewre h6{
    font-weight: bold;
}
/* REPORTADD */
.addtopre{
    display: flex;
    justify-content: space-between;margin-top: 20px;
}
.addsecre{
    display: flex;
    margin-top: 20px;
    justify-content: space-between;
}
.adddesre{
    margin-top: 10px;
}



/* Login */
.site-login {
    display: flex
;
    /* background-color: #8da5c8; */
    padding: 20px;
    flex-direction: row-reverse;
    align-content: center;
    flex-wrap: wrap;
    max-width: 350px;
    margin: 0 auto; /* กึ่งกลางแนวนอน */
    padding: 1rem;
}
.form-group {
    display: flex;
    margin-bottom: 1rem;
    justify-content: space-around;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
}
.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.ppppp {
    display: flex;
    background-color: #ffffff;
    flex-direction: row;
    align-content: center;
    flex-wrap: wrap;
    justify-content: space-evenly;
    /* border: 2px solid black; */
  /* border-radius: 8px; เพิ่มมุมโค้งถ้าต้องการ */
}
.menu-logoidc {
    width: 500px;
    height: auto;
    border-radius: 10px;
}


/* Userdetail */


.menu span{
    color: #CFC9FF;
}
.notecard:hover{
    box-shadow: 3px 3px 18px rgba(0, 0, 0, 0.3);
}
.editnote{
    border-radius: 5px;
}
.editnote:hover{
        background-color: #18133D;
}

/* REQUEST */
.cardreq{
    margin-bottom:10px;
}
.cardreq:hover{
    background-color: #f3f3f3;box-shadow: 3px 3px 18px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}
.textoverflownote{
    height: 125px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5; /* แสดงไม่เกิน 3 บรรทัด */
  -webkit-box-orient: vertical;
  background-color:#ebebeb ;
margin: 10px;
padding: 7px;
    border-radius: 10px;
}
.textoverflownotecontact{
        height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* แสดงไม่เกิน 3 บรรทัด */
  -webkit-box-orient: vertical;
margin: 10px;
padding: 7px;
    border-radius: 10px;
}
/* SELECT2 */
.select2-container .select2-search--inline {
    float: none;
}
    .select2-search__field {
                                min-width: 100% !important;
                            }
/* DETAILUPDATE */
.detailedit{
    color: red;
}

.topbar{
    display: flex;justify-content:space-between;align-items:center;
}

 
.togglebtncus img{
    background-color: #AFA9E0;
    width: 40px;   
    border-radius: 10px;
    padding: 5px;
}
.togglebtncus img:hover{
    background-color: #756fa2;

}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* พื้นหลังใส */
    z-index: 998; /* น้อยกว่า sidebar ที่ z-index: 999 */
}
.cussidebar{
    display: block !important;
    background-color: #18133D;
    width: 0px;
    top: 4px;
    bottom: 4px;
    left: 4px;
    z-index: 1;
    position: fixed;
    border-radius: 10px;
    overflow: hidden;
    font-weight: 700;
    transition: 0.5s;
    height: 100%;
    z-index: 999;
}
.cussidebar.active {
    width: 250px;
}
.cussidebar .menu{
    margin-top: 5%;background-color: none;
    
}
.cussidebar .menu a{
    margin: 10px 5px 0 5px;
    height: 60px;
    padding-left: 15px;
    text-decoration: none;
  font-size: 18px;
  display: block;
    background-color:none ;
    color: #ffffff;
    display: flex;
    align-items: center;
    border-radius: 10px;
    white-space: nowrap;
}
.cussidebar .menu a:hover{
    background-color: #AFA9E0;
    color: #18133D;
}
.cussidebar .menu img{
    background-color: none;
    width: 40px;
    height: auto;
    margin-right: 10px;
}

.cussidebar .headerbar img{
    width: auto;
    height: 55px;
}
.cussidebar .headerbar{
    display: flex;
    justify-content: center;
    padding: 15px;
}
.cussidebar .icon{
    position: absolute;
    text-decoration: none;
    height: 100%;
    right: 0;
    background-color: #AFA9E0;
    font-size: 20px;
    color: #18133D;
     display: flex;
    align-items: center;
    padding: 10px;
}


@media only screen and (max-width: 450px) {

  body {
  margin: 0;
  padding: 0;
  width: 180%;
  height: 100%;
}
.modal-dialog {
    max-width: 100% !important;  

}
  nav{
    display: none !important;
  }
.togglebtncus{
    display: block !important;
    transition: 0.5s;
    position: fixed;
    z-index: 1;
    margin-left: 10px;
    margin-top: 5px;
}
.modal-backdrop {

    width: 100%;
    height: 100%;
}
.btnstatus{
    width: 100px;
    height: 70px;
    overflow: hidden;
    text-align: center;         /* แนวนอน (ไม่จำเป็นหากใช้ flex) */
    display: flex;              /* ใช้ flexbox */
    justify-content: center;   /* จัดให้อยู่กลางแนวนอน */
    align-items: center;        /* ไม่ให้ขึ้นบรรทัดใหม่ */
    text-overflow: ellipsis; 
    padding: 1px;
}
.col-md-4{
    width: 50%;
}
.header-detail{
gap: 10px;
width: 100%;

}

.header-detail span{
    width: fit-content;
    height: 50px;
 overflow: hidden;
    text-align: center;        
    display: flex;              
    justify-content: center;   
    align-items: center;        
    
    padding: 1px;
}
.colorblock{
    gap: 5px;
    display: block !important;

    border-radius: 5px;
}
.headerbar{
    gap: 20px !important;
}
.login-ms{
    color: white;
    white-space: nowrap;
}
.ppppp{
    display: none;
}
body.bodyloginmobile {
    width: 100%;
}
.site-loginmobile {
        display: block !important;
        width: 200px;
        margin-left: 50%;
        transform: translateX(-50%);
        margin-top: 40%;
    }
.menu-logoidc{
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }
.sidebar{
    display: none;
}
.content{
    margin-left: 0px;
}
.togglebtn{
    display: none;
}
.logout{
    
    background-color:none;
      display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100%;

  
  
}

.logout img{
    width: auto;
    height: 20px;
    margin-right: 5px;
}
.logout a{
    font-size: 14px;
    text-decoration: none;
    background-color: #BC2424;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 10px;
}
.logout a:hover{
    background-color: #8d1a1a;
}
.inputmobile{
    width:  200px !important;
}
.select2 {
    width: 200px !important;
}

.grid .select2{
    width: auto !important;
}
  .container {


}
}


@media only screen and (max-width: 780px) {
    body{
     min-width: 100%;
    }
  nav{
    display: none !important;
  }.togglebtncus{
    display: block !important;
    transition: 0.5s;
    position: fixed;
    z-index: 1;
    margin-left: 10px;
    margin-top: 5px;
}

.login-ms{

    color: white;
    white-space: nowrap;
}
.login-form img{
  width: 50px !important;
  height: auto !important;
}
.container{
    margin: 0px;
    max-width: 100%;
}
.col-md-4{
    width: 50%;
}
.menu-logoidc{
    max-width: 250px;
    max-height: 250px
}
.inputmobile{
    width: auto !important;
}
.filespone{
    width: 100px;
}
.sidebar{
    display: none;
}
.content{
    margin-left: 0px;
}
.togglebtn{
    display: none;
}
.modal-dialog {
    max-width: 90vw;  /* 90% ของความกว้าง viewport */

}
.ppppp{
    margin-top: 40%;
    transform: translateY(-50%);
}}

/* CALENDAR */
.fc-event:hover {
    background-color: #3a3a3a !important; 
    color: white !important; 
    cursor: pointer;
}
.fc-unthemed td.fc-today {
    background: #74ff9d;
}