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

html{
   font-size: 93.75%;
}

:root {
   /* 1rem = 16px(User Agent) = 100%(User Agent)*/
   /* font-size: 62.5%; 10px */

   /*CORES*/
   --bg-header: #2d4a22;
   --bg-gray: #eeeeee;
   --white: #fff;
   --dark-blue: #363f5f;
   --green: #49AA26;
   --light-green: #3DD705;
   --red: #E92929;

   /*FONTS*/
   --main-font: 'Poppins', sans-serif;
}

body {
   background-color: var(--bg-gray);
   font-family: var(--main-font);
}

.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(90%, 800px);
   margin: 0 auto;
}

/* Ttles =============================*/
h2 {
   margin-top: 3.2rem;
   margin-bottom: 0.8rem;
   color: var(--dark-blue);
   font-weight: 400;
}

/* Links & Buttons =============================*/

a{
   color: var(--green);
   text-decoration: none;
}

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

button{
   cursor: pointer;
   width: 100%;
   height: 50px;
   border: none;
   color: white;
   background-color: var(--green);
   border-radius: .25rem;
}

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

.button.new{
   display: inline-block;
   margin-bottom: .8rem;
}

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

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

/* HEADER =============================*/

header {
   background-color: var(--bg-header);
   padding: 2rem 0 10rem;
   text-align: center;
}

#logo {
   color: var(--white);
   font-weight: 100;
}

/* BALANCE =============================*/

#balance {
   margin-top: -8rem;
}

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

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

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

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

#balance .card.total {
   background: var(--green);
   color: white;
}

/* TRANSACTION TABLE=============================*/

#transaction{
   display: block;
   width: 100%;
   overflow-x: auto;
}

#data-table {
   width: 100%;
   border-spacing: 0 0.5rem;
   color: #969cb3;

}

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

table tr{
   opacity: .7;
}


table tr:hover, table thead tr{
   opacity: 1;
}

table tbody td {
   cursor: pointer;
   background: white;
   padding: 1rem 2rem;
}

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

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

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

td.income{
   color: #12A454;
}

td.expense{
   color: var(--red);
}

/* MODAL =============================*/

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

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

.modal{
   background-color: #F0F2F5;
   padding: 2.4rem;
   position: relative;
   width: min(600px, 90%);
}

/* FORM =============================*/
#form h2{
   margin-top: 0;
}

input{
   border: none;
   width: 100%;
   border-radius: .2rem;
   outline: none;
   padding: .8rem;
}

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

.input-group small{
   opacity: .4;
}

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

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

/* FOOTER =============================*/

footer {
   text-align: center;
   padding: 4rem 0 2rem 0;
   color: var(--dark-blue);
   opacity: .6;
}

/* RESPONSIVE =============================*/

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

   #balance{
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 2rem;
   }
}