/* RESET + BASE (Mobile-First) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f5f6fa;
  color: #333;
  min-height: 100vh;
}

/* HEADER */
header {
  background-color: #4f46e5;
  color: white;
  padding: 20px;
  text-align: center;
}

/* MAIN */
main {
  max-width: 100%;
  padding: 20px;
}

/* FORMULÁRIO */
.form-section {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.form-section form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-section input {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.form-section button {
  padding: 10px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.form-section button:hover {
  opacity: 0.9;
}

/* LISTA DE TAREFAS */
.tasks-section h2 {
  margin-bottom: 15px;
}

#task-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* CARD DA TAREFA */
.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #4f46e5;
}

.task h3 {
  margin-bottom: 5px;
}

.task p {
  font-size: 14px;
  color: #555;
}

/* TAREFA CONCLUÍDA */
.task.done {
  opacity: 0.6;
  border-left-color: green;
}

.task.done h3 {
  text-decoration: line-through;
  color: gray;
}

/* AÇÕES */
.task-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-actions input {
  cursor: pointer;
}

.task-actions button {
  background: #ef4444;
  border: none;
  color: white;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #666;
}

/* ===== DESKTOP (Responsividade) ===== */
@media (min-width: 768px) {
  main {
    max-width: 600px;
    margin: auto;
  }

  .task {
    align-items: flex-start;
  }
}

