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

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

html{
  font-size: 93.75%;
}

body{
  background: #F0F2F5;
  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, 500px);
  margin: auto;
}

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

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

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

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

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

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

h2{
  margin-top: 3.2rem;
  margin-bottom: 0.8rem;
  color:var(--dark-blue);
  font-weight: normal;
}

header{
  background: #080f20;
  padding: 2rem 0 10rem;
  text-align: center;
}

#logo{
  color:#fff;
  font-weight: 100;
}

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

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

.card{
  background: white;
  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;
  align-items: center;
  justify-content: space-between;
}

.card p{
  font-size: 2rem;
  line-height: 3rem;

  margin-top: 1rem;
}

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

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

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

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;
  color:#969cb3;
  padding: 1rem 2rem;
  text-align: left;
  font-weight: normal;
}

table tbody tr{
  opacity: 0.7;
}

table tbody tr:hover{
  opacity: 1;
}

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

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{
  background: #f0f2f5;
  padding: 2.4rem;
  position: relative;
  z-index: 1;
}

#form{
  max-width: 500px;
}

#form h2{
  margin-top: 0;
}

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

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

.input-group .help{
  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{
  text-align: center;
  padding: 4.5rem 0 2rem;
  color: var(--dark-blue);

  opacity: 0.6;
}

.darkmode{
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

header.dark {
  background: #090c08;
}
body.dark {
	background: #080f20;
}

.checkbox {
	opacity: 0.5;
	position: absolute;
}

.label {
  background: rgba( 6, 13, 44, 0.05 );
  box-shadow: 0 8px 32px 0 rgba(37, 45, 151, 0.37);
  backdrop-filter: blur( 4px );
  -webkit-backdrop-filter: blur( 4px );
  border-radius: 10px;

	border-radius: 50px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px;
	position: relative;
	height: 26px;
	width: 50px;
	transform: scale(1.5);
}

.label .ball {
	background-color: #fff;
	border-radius: 50%;
	position: absolute;
	top: 5px;
	left: 4px;
	height: 17px;
	width: 17px;
	transform: translateX(0px);
	transition: transform 0.2s linear;
}

.checkbox:checked + .label .ball {
	transform: translateX(24px);
}


.fa-moon {
	color: #dfe6e9;
}

.fa-sun {
	color: #f1c40f;
}
td.description{
    color: var(--dark-blue);
}
td.income{
    color: #12a454;
}
td.expense{
    color: #e92929;
} 

@media(min-width:800px){

  html{
      font-size: 87.5%;
  }

  #balance{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .darkmode{
    position: relative;
    left: 47%;
    top: 25px;
  }  
  header.dark {
    background: #080f20;
  }
  body.dark {
    background: #080f20;
  }

  .checkbox {
    opacity: 0;
    position: absolute;
  }

  .label {
    background: rgba( 6, 13, 44, 0.05 );
    box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
    backdrop-filter: blur( 4px );
    -webkit-backdrop-filter: blur( 4px );
    border-radius: 10px;

    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    height: 26px;
    width: 50px;
    transform: scale(1.5);
  }

  .label .ball {
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    left: 4px;
    height: 17px;
    width: 17px;
    transform: translateX(0px);
    transition: transform 0.2s linear;
  }

  .checkbox:checked + .label .ball {
    transform: translateX(24px);
  }


  .fa-moon {
    color: #dfe6e9;
  }

  .fa-sun {
    color: #f1c40f;
  }
  td.description{
      color: var(--dark-blue);
  }
  td.income{
      color: #12a454;
  }
  td.expense{
      color: #e92929;
  } 

}