:root {
    --dark-blue: #363f5f;
    --green: #49AA26;
    --light-green: #3dd705;
    --red: #e92929;
    --blue: #0567e7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

html {
    font-size: 93.75%;
}

body {

    background: #2F2FD4;
    font-family: 'Poppins', sans-serif;
    
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    
}

.container {
   
    width: min(90vw, 850px);
    margin: auto;
}

h2{
    margin-top: 3.2rem;
    margin-bottom: 0.8rem;
    color: black;
    font-weight: normal;
}

a{
    color: #49AA26;
    text-decoration: none;
}

a:hover{
    color: var(--green);
}

button {
    width: 100%;
    height: 50px;
    border: none;
    color: white;
    background: var(--green);
    padding: 0;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 20px;
}

button:hover{
    background: var(--light-green);
}

.button.new {
    color: #FFF;
    font-size: 23px;
    display: inline-block;
    margin-bottom: .5rem;
}

.button.new:hover {
    width: 100%;
    color: #000000;
}

.button.cancel {
    color: var(--red);
    border: 2px var(--red) solid;
    border-radius: 1rem;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    font-size: 20px;
}

.button.cancel:hover {
    opacity: 2;
}

header {
    
    padding: 2rem 0 10rem;
    text-align: center;
}

header img {
    width: 12.5rem;
    height: 9.5rem;
 
}

header h1 {
    font-size: 3rem;
}

.people {
    width: 350px;
    height: 350px;
    position: absolute;
    display: flex;
    left: 50px;
    top: 320px;

}

.people img {
    width: 300px;
    height: 300px;
}

#logo {
    color: #fff;
    font-weight: 600;
}
#balance {
    margin-top: -8rem;
}

#balance h2 {
    color: white;
    margin-top:0;
}

#card-income {
    background: var(--green);
}

#card-expense {
    background: var(--red);
}

.card {
    padding: 1.5rem 2rem;
    border-radius: 0.25rem;
    margin-bottom: 2rem;
    color: var(--dark-blue);
}

.card h3 {
    font-weight: normal;
    font-size: 1rem;
    display: flex;
    color: #FFF;
    align-items: center;
    justify-content: space-between;
}

.card p {
    font-size: 2rem;
    line-height: 3rem;
    margin-top: 1rem;
    color: #FFF;
}

.card.total{
    background: #5C39FB;
    color: white;
}

.card.total img {
    width: 20px;
    height: 15px;
}

.add-search {
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;

}

  /*Resize the wrap to see the search bar change!*/
  .wrap{
    width: 30%;
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

.search {
    width: 100%;
    justify-content: center;
    display: flex;
    margin-top: -2.3rem;
    margin-bottom: 1rem;
  }
  
  .searchTerm {
    width: 40%;
    border: 3px solid #00B4CC;
    border-right: none;
    padding: 5px;
    height: 40px;
    border-radius: 5px 0 0 5px;
    outline: none;
    color: #9DBFAF;
  }
  
  .searchTerm:focus{
    color: #00B4CC;
  }

  .searchButton {
    width: 30px;
    height: 40px;
    border: 1px solid #00B4CC;
    background: #00B4CC;
    text-align: center;
    color: #fff;
    border-radius: 0 5px 5px 0;
    font-size: 20px;
  }

.mobile{
    width: 100%;
    border-spacing: 0 0.5rem;
    color: #7a7a7b;
    background: white;
    opacity: 0.7;
}

.mobile thead th {
    background: white;
    font-weight: normal;
    padding: 1rem 2rem;
    text-align: left;
}

.mobile thead th:nth-child(1) {
    width: 43.4%;
}
.mobile thead th:nth-child(2) {
    width: 24.1%;
}



.descriptionDiv::-webkit-scrollbar-thumb{
    border-radius: 6px;
    background: linear-gradient(to top, #00ccff, #0059ff);
    
}

  .descriptionDiv::-webkit-scrollbar{
      top: 0;
      right: 0;
      width: 5px;
      background: rgba(8, 2, 65, 0.411);
      height: 0.5rem;
  }

  #transaction::-webkit-scrollbar {
    background-color: #2F2FD4;

  }

  
.descriptionDiv{
    
    width: 15rem;
    height: 6rem;
  
}
.div {
    width: 99%;     
}


#transaction{
  
    width: 100%;
    height: 30rem;
    margin-top: 1rem;
    margin-left: 0rem;
    z-index: -5;
    overflow-y: scroll;
   
}

#data-table {
    width: 100%;
    border-spacing: 0 0.5rem;
    color: #7a7a7b;
}



table thead tr th:first-child,
table tbody tr td:first-child {
    border-radius: 0.25rem 0 0 0.25rem;
}

table thead tr th:last-child,
table tbody tr td:last-child{
   
    border-radius: 0 0.25rem 0.25rem 0;
}

table thead th{

    background: white;
    opacity: 0.9;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 5rem 1rem 5.8rem;
    text-align: left;
}

table tbody {
 position: relative;

}

table tbody tr {
    opacity: 0.7;
}

table tbody tr:hover {
    opacity: 1;
}

table tbody td {
    background: white;
    font-weight: 600;
    font-size: 1.5rem;
    padding: 1.5rem 1rem 1rem 5rem;
}


td.description {
    color: var(--dark-blue);
}

td.income {
    color: #12a454;
}

td.expense {
    color: #e92929;
}

.modal-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0, 0.7);
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 900px;
    height: 350px;
    background: #8aebb1;
    padding: 2.4rem;
    position: relative;
    border-radius: 15px;
    z-index: 1;
}

.modal h2 {
    font-weight: bold;
}

.modal #form .help {
    color: #000;
    font-weight: bold;
}

.modal .add-transaction {
    display: flex;
    width: 220px;
    height: 220px;
    margin-left: 560px;
    margin-top: -220px;
}

#form {
    max-width: 500px;
}

#form h2 {
    margin-top: 0;
}

#form form input {
    border: none;
    border-radius: 0.2rem;
    padding: 0.8rem;
    width: 100%;
}



.input-group{
    margin-top: 0.8rem;   
}

.input-group small {
    opacity: 0.4;
}

.input-group.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group.actions .button,
.input-group.actions button {
    width: 48%;
}  



footer {
   display: flex;
   align-items: center;
   justify-content: center;
  width: 100%;
  height: 80px;
    text-align: center;
    padding: 2rem 0 2rem;
    color: var(--dark-blue);
    opacity: 0.6;
}

footer p {
    color: #FFFFFF;
}

/* =====RESPONSIVE MOBILE */


@media screen and  ( max-width: 768px){

    header img {
        width: 60px;
        height: 60px;
    }

    header h1 {
        font-size: 1.1rem;
    }
    
    .people {
        display: none;
    }    
    
    .wrap{
        margin-top: 40px;
        width: 50%;
    }
    
    .top{
        visibility: visible;
    }
    .mobile{
        visibility: visible;
        height: 20px;
    }

    .card {
        height: 100px ;
    }

    .card  p {
        font-size: 1.5rem;
        margin-top: 2px;
    }

    .button.new {
        font-size: 1.3rem;
    }

    #transaction {
        margin-top: 4rem;
    }

    .searchTerm {
        width: 100%;
        font-size: .6rem;
    }


    .wrap {       
      
       top: 600px;
      
    }

    .modal {
        width: 270px;
        height: 350px;
        background: #8aebb1;
        padding: 2.4rem;
        position: relative;
        border-radius: 15px;
        z-index: 1;
    }

    .modal #form .help {
        color: #000;
       font-size: .5rem;
    }

    .modal .button.cancel {
        font-size: .95rem;
    }

    button {
        font-size: .95rem;
    }


    .mobile th {
    
        font-size: .8rem;
       padding: .5rem .5rem;
    }


    table tbody td {
        background: white;
        font-weight: 400;
        font-size: .5rem;
        padding: .2rem .2rem 0;
    }

    table tbody td.description {
       padding: 0 2rem;
    }

    table tbody tr img {
        width: 18px;
        height: 18px;
    }
    
        table thead th{
            background: white;
            opacity: 0.7;
            font-weight: normal;
            text-align: center;
            background: fixed;
            padding: .2rem .5rem .2rem 1rem;
            width: 50rem;
        }

    
         thead th:nth-child(1) {
            
            
        }
        thead th:nth-child(2) {
            
        }
        .descriptionDiv{
            
            width: 11rem;
            height: 4rem;
        }
    
        .div {
            width: 99%;     
        }
    }


    
  @media screen and  (width: 820px){

    .button.new {
        font-size: 1.45rem;
    }
    
    .wrap{

        position: relative;
        margin-bottom: 25px;
        width: 500px !important;
        left: 140px;
    }
  } 


@media screen and  (max-width: 1080px){
    
.people {
    display: none;
}    

.wrap{
    margin-top: 45px;
    width: 50%;
}

.top{
    visibility: visible;
}
.mobile{
    visibility: visible;
    height: 1rem;
}

    table thead th{
        background: white;
        opacity: 0.7;
        font-weight: normal;
        text-align: center;
        background: fixed;
        padding: 1.8rem 1rem;
        width: 50rem;
    }

     thead th:nth-child(1) {
        
        
    }
    thead th:nth-child(2) {
        
    }
    .descriptionDiv{
        
        width: 11rem;
        height: 4rem;
    }

    .div {
        width: 99%;     
    }
}

@media screen and  (max-width: 1280px){
    
    .people {
        display: none;
    }  

    .wrap{
        margin-top: 45px;
        width: 45%;
    }
  }   

  @media screen and  (max-width: 1360px){
    
    .people {
        display: none;
    }  

    .wrap{
       
        width: 45% !important;
    }
  }  

  @media screen and  (max-width: 1440px){

    
    .people img {
       width: 100%;
       height: 100%;
    }  

    .wrap{
        margin-top: 45px;
        width: 40%;
    }
  } 

  @media screen and  (max-width: 1600px){
    
    .wrap{
        margin-top: 45px;
        width: 40%;
    }
  } 

  @media screen and  (max-width: 1680px){
    
    .wrap{
        margin-top: 45px;
        width: 35%;
    }
  } 

@media (min-width: 800px) {
    html{
        font-size: 87.5%;
    }

    #balance {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }


}



