:root {
  --primary-color: #2563eb;
  --secondary-color: #f0f0f0;
}
body {
  height: 100vh;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;

  display: grid;
  grid-auto-rows: auto 1fr;
}

/* HEADER */
header {
  background-color: var(--primary-color);
  padding: 0.8rem;

  display: grid;
  justify-content: end;
}
header > div {
  margin-right: 3rem;

  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}
header > div > div {
  font-size: 1.15rem;
  font-weight: bold;
  color: white;
}
header img {
  height: 1.5rem;
  width: 100%;
}

/* CONTENT */
body > div {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: auto 1fr;
}

/* SIDEBAR */
.sidebar {
  padding: 1.7rem;
  width: 12rem;
  background-color: var(--secondary-color);
}

.sidebar > div:first-child {
  padding: 0.3rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;

  display: grid;
  grid-auto-flow: column;
  justify-content: space-between;
  align-items: center;
}
.sidebar > .project:hover {
  background-color: #dedede;
}
.sidebar > div:first-child > div:first-child {
  font-weight: bold;
}
.sidebar > div:first-child > div:last-child {
  width: 1.5rem;
  text-align: center;
  cursor: pointer;
  color: rgb(202, 152, 248);
  font-size: 1.3rem;
}
.sidebar > div:first-child > div:last-child:hover {
  color: rgb(72, 72, 255);
}

.sidebar > .project {
  cursor: pointer;
  padding: 0.15rem;
  border-radius: 0.5rem;
  padding-left: 1rem;

  display: grid;
  grid-template-columns: auto 1fr auto;
  justify-content: start;
  align-items: center;
  gap: 0.2rem;
}
.sidebar > .project > svg {
  height: 1.3rem;
}
.sidebar > .project > div {
  font-size: 0.9rem;
}
.sidebar > .project > div:last-child {
  cursor: pointer;
  height: 1.3rem;
  width: 1.3rem;
  color: rgb(154, 154, 154);
  margin-right: 0.28rem;

  display: grid;
  place-items: center;
}
.sidebar > .project > div:last-child:hover {
  border-radius: 50%;
  background-color: rgb(255, 79, 79);
}

/* PROJECT FORM */
.projectForm {
  position: absolute;
  visibility: hidden;

  margin-top: -0.35rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background-color: #d3d3d3;
  border-radius: 12px;

  display: grid;
  gap: 0.2rem;
}
.projectForm input {
  font-size: 0.85rem;
  padding: 0.2rem;
  border-radius: 6px;
  border: 1px solid gray;
  width: 95%;
}
.projectForm label {
  font-size: 0.85rem;
}

/* MAIN */
.main {
  margin-left: 15%;
  margin-top: 4em;

  display: grid;
  justify-items: start;
  align-content: start;
}
.main > div:first-child {
  font-weight: bold;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.main > div:last-child {
  padding-right: 0.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-left: 1.13rem;
  display: grid;

  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
}

.main > div:last-child > div:first-child {
  text-align: center;
  width: 1.7rem;
  color: blue;
  font-size: 1.5rem;
}
.main > div:last-child > div:last-child {
  color: rgb(189, 189, 189);
  position: relative;
  top: 1px;
}
.main > div:last-child:hover > div:first-child {
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
}
.main > div:last-child:hover > div:last-child {
  color: var(--primary-color);
}

/* TASKS */
.tasks {
  display: grid;
  justify-items: start;
  align-content: start;
}
.task {
  border-radius: 10px;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: 1.5rem;
  margin-top: 0.5rem;

  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 0.5rem;
}
.task:hover {
  background-color: var(--secondary-color);
  border-radius: 6px;
}
.task input {
  cursor: pointer;
  width: 1rem;
  height: 1rem;
}
.task > div:nth-child(2) > div:first-child {
  font-size: 1.2rem;
}
.task > div:nth-child(2) > div:last-child {
  color: blue;
}
.task > div:last-child {
  cursor: pointer;
  font-size: 0.9rem;
  height: 1.3rem;
  width: 1.3rem;
  margin-left: 5vw;
  color: rgb(154, 154, 154);

  display: grid;
  place-items: center;
}
.task > div:last-child:hover {
  background-color: rgb(255, 79, 79);
  border-radius: 50%;
}

.task #desc {
  max-width: 35rem;
  margin-bottom: 0.5rem;
}

/* FORM */
.addTaskForm {
  position: absolute;
  place-self: center;
  visibility: hidden;

  background-color: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 5px 5px 5px lightgray;
  padding: 2rem;

  display: grid;
  gap: 0.5rem;
}
.addTaskForm > div {
  width: 30rem;

  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 5rem 1fr;
  align-items: center;
  gap: 0.5rem;
}

.addTaskForm > div:first-child {
  position: absolute;
  top: 8px;
  left: 11px;

  font-size: 1.1rem;
  color: rgb(154, 154, 154);
  cursor: pointer;
  height: 1.5rem;
  width: 1.5rem;

  display: grid;
  grid-template-columns: auto;
  place-items: center;
}
.addTaskForm > div:first-child:hover {
  background-color: rgb(255, 79, 79);
  border-radius: 50%;
}

.addTaskForm label {
  justify-self: end;
}
.addTaskForm input[type="text"],
.addTaskForm textarea {
  width: 100%;
}
.addTaskForm input[type="datetime-local"],
.addTaskForm select {
  width: max-content;
}
.addTaskForm textarea {
  resize: none;
}
.addTaskForm button {
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  margin-left: 5.5rem;
  padding: 0.5rem;
  background-color: rgb(66, 133, 233);
  color: white;
  border: none;
  border-radius: 6px;
}
