*{
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}
nav{
    background-color: rgb(242, 242, 242);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    position: fixed;
    top: 0px;
    width: 100vw;
    z-index: 10;
}
nav img{
    width: 130px;
}
nav button{
    background-color: transparent;
    border: none;
    padding: 7px;
    outline: none;
}
nav button:hover{
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.104);
}
nav button img{
    width: 35px;
}
nav div{
    display: flex;
    align-items: center;
}
nav div p{
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
}
nav .maindropdown{
    position: absolute;
    top:75px;
    right: 0px;
    background-color: white;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 0 5px grey;
    min-width: 150px;
    text-align: center;
    display: none;
    z-index: 5;
    overflow: hidden;
}
nav .maindropdown a{
    color: black;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    font-weight: bold;
    width: 150px;
    justify-content: flex-start;
    text-align: left;
}
nav .maindropdown a p{
    font-size: 1rem;
    text-transform: none;
}
nav .maindropdown a:hover{
   border-left: 10px solid grey;
   background-color: rgb(255, 226, 226);
}
nav .maindropdown a img{
    width: 20px;
}
nav h3{
    font-size: 2rem;
}

.centerbox{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgb(242, 242, 242);
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 0 5px grey;
}
.centerbox h3{
    font-weight: bold;
    font-size: 1.5rem;
}
.centerbox input{
    padding: 10px;
    margin: 10px;
    border: none;
    box-shadow: inset 0 0 5px grey;
    width: 250px;
    border-radius: 50px;
}
.centerbox button{
    background-color: lightgrey;
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    color: black;
    font-weight: bold;
}



.popmsg{
    position: absolute;
    bottom: 5px;
    right: 10px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 5px grey;
    animation: popup 2s forwards;
}
.popmsg p{
    font-size: 0.9rem;
    color: white;
}
@keyframes popup {
    0%{
        bottom: 5px;
    }
    100%{
        bottom: 25px;
    }
}


.dashboard{    
    position: relative;
    height: 92vh;
    position: fixed;
    top: 76px;
    width: 100vw;
    z-index: 8;
}
.sidepanel{
    background-color: white;
    height: 100%;
    border-right: 0.5px solid lightgrey;
    border-top: 0.5px solid lightgrey;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0%;
    width: 200px;
}
.sidepanel .tab{
    text-decoration: none;
    display: block;
    width: 200px;
    color: rgb(50, 50, 50);
    font-weight: bold;
    padding: 10px;
    border-bottom: 0.5px solid lightgrey;
    display: flex;
    gap: 20px;
    align-items: center;
}
.sidepanel .selected{
    background-color: rgb(222, 222, 222);
    border-left: 10px solid grey;
}
.sidepanel .tab:hover{
    background-color: rgb(222, 222, 222);
    border-left: 10px solid grey;
}
.sidepanel .tab img{
    width: 25px;
}

.sidepanel .subtab{    
    display: none;  
    position: relative;  
    z-index: 10;
}
.sidepanel .subtab div{
    position: absolute;
    top: -40px;
    left: 100%;
    width: 250px;
    background-color: white;
    box-shadow: 0 0 5px lightgrey;
}
.sidepanel .subtab:hover{
    display: block;    
}
.sidepanel .subtab a{
    text-decoration: none;
    display: inline-block;
    color: rgb(50, 50, 50);
    font-weight: bold;
    padding: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.sidepanel .subtab .a.selected{
    background-color: rgb(242, 242, 242);
    border-left: 10px solid grey;
}
.sidepanel .subtab img{
    width: 25px;
}
.sidepanel .subtab a:hover{
    background-color: rgb(242, 242, 242);
    border-left: 10px solid grey;
}
.sidepanel .tab:hover + div{
    display: block;
}
.mainpanel{
    padding: 20px;
    padding-left: 220px;
    height: 100%;
    overflow: auto;
    scrollbar-width: thin;
}


.flexdiv{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
}
.flexdiv div{
    display: flex;
    align-items: center;
    gap: 5px;
}
.flexdiv a{
    background-color: rgb(242, 242, 242);
    border-radius: 8px;
    padding: 8px;
    display: inline-block;
    text-decoration: none;
    color: rgb(50, 50, 50);
    font-weight: bold;
    margin-right: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.flexdiv a:hover{
    box-shadow: none;
    background-color: lightgrey;
}
.flexdiv a img{
    width: 15px;
}

.flexdiv button{
    background-color: rgb(242, 242, 242);
    border-radius: 8px;
    padding: 8px;
    display: inline-block;
    text-decoration: none;
    color: rgb(50, 50, 50);
    font-weight: bold;
    margin-right: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    border: none;
}
.flexdiv button:hover{
    box-shadow: none;
    background-color: lightgrey;
}
.flexdiv button img{
    width: 15px;
}
.flexdiv select{
    padding: 5px;
    margin-right: 5px;
    border-radius: 5px;
}








.formpage{
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.515);
    z-index: 13;
}
.formpage .formelement{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 25px;
    text-align: center;
    max-height: 75vh;
    overflow: auto;
    scrollbar-width: thin;
}


.hiddenelement{
    display: none;
}
.formelement{
    box-shadow: 0 0 5px grey;
    border-radius: 10px;
    padding: 10px;    
}
.formelement td{
    padding: 5px;
}
.formelement td:first-child{
    text-align: right;
}
.formelement td.extratd{
    width: 45px;
    text-align: left;
}
.formelement input{
    padding: 8px;
    margin: 3px;
    border: none;   
    box-shadow: inset 0 0 5px grey;
    width: 300px;
    border-radius: 5px;
}
.formelement input:focus{
    outline: 0.5px solid black;
}
.formelement input:read-only{
    opacity: 0.5;
    outline: none;
}
.formelement input[type='checkbox']
{
    width: 25px;
    height: 25px;
}
.formelement input[type='file']
{
    box-shadow: none;
}
.formelement select{
    padding: 8px;
    margin: 3px;
    border: none;
    box-shadow: inset 0 0 5px grey;
    width: 300px;
    border-radius: 5px;
}
.formelement button{
    background-color: lightgrey;
    padding: 8px;
    margin: 3px;
    border: none;
    border-radius: 5px;
    color: black;
    font-weight: bold;
    font-size: 15px;
}
.formelement button:disabled{
    opacity: 0.5;
}
.formelement a{
    background-color: lightgrey;
    padding: 8px;
    margin: 8px;
    border: none;
    border-radius: 5px;
    color: black;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    font-size: 15px;
}
.formtable{
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
    padding: 3px;
}
.formtable table{
    width: 100%;
    border-collapse: collapse;
}
.formtable th{
    background-color: rgb(242, 242, 242);
    text-align: left;
    padding: 8px;
}
.formtable input{
    width: 180px;
}
.formtable select{
    width: 180px;
}
/* .formelement .formtable th{
    text-align: center;
} */
.formelement .formtable td{
    text-align: left;
    background-color: white;
    padding: 0px 5px;
    border-bottom: none;
}
.formelement .formtable td input{
    margin: 0px 5px;
}
.formelement .formtable td select{
    margin: 0px 5px;
}
.formelement .formtable td button{
    margin: 4px 5px;
}
.formtwogrid{
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    align-items: start;
}
.formelement textarea{
    width: 300px;
    height: 100px;
    margin: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    box-shadow: inset 0 0 5px grey;
}
.rightflex{
    display: flex;
    align-items: top;
    justify-content: space-between;
    
}
.rightflex div:last-child{
    text-align: right;
}
form .errspan{
    font-size: 0.8rem;
    color: red;
    display: block;
}




.expbtn{
   display: flex;
    gap: 10px;
    align-items: center; 
}

.flexform{
    display: flex;
    justify-content: flex-start;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
}
.flexform form{
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: end;
}
.flexform form .expbtn{
    padding: 5px 15px;
    background-color: rgb(242, 242, 242);
    border-radius: 5px;
    border: none;    
    color: black;
    font-weight: bold;
    max-height: 40px;
    height: 60%;
    display: flex;
    gap: 10px;
    align-items: center;
}
.flexform form .expbtn:hover{
    background-color: lightgrey;
    border: none;
}
.expbtn img{
    width: 15px;
}
.flexform input{
    width: 100%;
    padding: 10px;
    border-radius: 15px;
    box-shadow: inset 0 0 5px lightgrey;
    border: none;
    outline: none;
    margin-right: 10px;
}
.flexform select{
    width: 100%;
    padding: 10px;
    border-radius: 15px;
    box-shadow: inset 0 0 5px lightgrey;
    border: none;
    outline: none;
    margin-right: 10px;
}
.flexform button{
    padding: 5px;
    margin: 5px;
    border-radius: 5px;
    border: none;
}
.flexform button img{
    width: 20px;
}
form .flexform{
    align-items: end;
}
.inpdiv{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
    position: relative;
}
.inpdiv input{
    width: 230px;
    border-radius: 8px;
}
.inpdiv input[type='checkbox']
{
    width: 25px;
    height: 25px;
}
.inpdiv select{
    width: 230px;
    border-radius: 8px;
}
.inpdiv label{
    margin-left: 5px;
}
.dateinpdiv{
    display: flex;
}
.dateinpdiv .inpdiv input{
    width: 150px;
}
.search-container {
    position: relative;
    display: inline-block;
}
.inpdiv .search-container input {
    padding: 10px;
    padding-left: 40px; /* Space for the icon */    
    outline: none;
}
.inpdiv .search-container select {
    padding: 10px;
    padding-left: 40px; /* Space for the icon */    
    outline: none;
}
.inpdiv .search-container-right input {
    padding: 10px;
    padding-right: 40px; /* Space for the icon */    
    outline: none;
}
.inpdiv .searchresult .checkboxhold{
    display: flex;
    gap: 5px;
    align-items: center;
}
.inpdiv .searchresult input[type='checkbox'] {
    padding: 10px;
    margin: 3px;
    width: 20px;
    height: 20px;
    padding-right: 40px; /* Space for the icon */    
    outline: none;
}
.search-container .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
}
.search-container-right button{
    background-color: transparent;
    margin: 0px;
    padding: 0px;
}
.search-container-right .search-icon {
    position: absolute;
    right: 20px;
    top: 45%;
    transform: translateY(0%);
    width: 20px;
    height: 20px;
}
.search-container input:focus .search-icon{
    display: none;
}
.search-container select:focus .search-icon{
    display: none;
}
.searchresult{
    position: absolute;
    top: 100%;
    left: 0px;
    width: 250px;
    border-radius: 5px;
    background-color: rgba(250, 250, 250);
    color: black;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 5px grey;
    z-index: 8;
}
.searchresult button{
    background-color: transparent;
    border: none;
    font-weight: bold;
    padding: 10px;
    text-align: left;
    
}
.searchresult button:hover{
    background-color: lightgrey;
}






.datatable{
    border-radius: 10px;
    overflow: auto;
    margin-top: 8px;
    max-height: 65vh;
    scrollbar-width: thin;
}
.datatable table{
    width: 100%;
    border-collapse: collapse;
}
.datatable thead{
    position: sticky;
    top: 0px;
    z-index: 4;
}
.datatable tr{
    border-bottom: 0.5px solid lightgrey;
}
.datatable tr:first-child{
    position: sticky;
    top: 0px;
    z-index: 4;
    border-bottom: none;
}
.datatable table th{
    background-color: rgb(242, 242, 242);
    text-align: left;
    padding: 8px;
}
.datatable table td{
    text-align: left;
    background-color: white;
    padding: 5px;    
    height: 30px;
    position: relative;
}
.datatable .lastcell{
    text-align: right;
    padding-right: 10px;
}
.datatable td a{
    padding: 5px;
    background-color: lightgrey;
    border: 2px solid lightgrey;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 0 5px grey;
} 
.datatable td a:hover{
    box-shadow: none;
    background-color: transparent;    
    margin: 0px;
}
.datatable td a img{
    width: 15px;
}
.datatable td button{
    padding: 3px;
    margin: 0px 5px;
    background-color: lightgrey;
    border: 2px solid lightgrey;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 0 5px grey;
} 
.datatable td button:hover{
    box-shadow: none;
    background-color: transparent;
}
.datatable td button img{
    width: 15px;
}
.datatable td .flexbtn{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: black;
}
.datatable td.consume{
    background-color: lightsalmon;
}
.datatable td.purch{
    background-color: palegreen;
}
.datatable .remark p{
     overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    text-wrap: balance;
    -webkit-line-clamp: 2;
    position: relative;
}
.datatable .remark span{
    position: absolute;
    top: 0px;
    left: 15px;
    background-color: white;
    padding: 5px;
    box-shadow: 0 0 5px grey;
    border-radius: 5px;
    z-index: 15;
    display: none;
    width: 80%;
}
.datatable .remark:hover span{
    display: block;
}

.narrow{
    margin: 5px auto;
    max-width: 900px;
}


.pagenums{
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}
.pagenums a{
    text-decoration: none;
    background-color: white;
    color: grey;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}
.pagenums .active{
    background-color: lightgrey;
    color: black;
    padding: 10px;
}
.pagenums button{
    text-decoration: none;
    background-color: white;
    border: none;
    color: grey;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}
.pagenums button.active{
    background-color: lightgrey;
    color: black;
    padding: 10px;
}
