|
<!DOCTYPE html> |
|
<html lang="pt-BR"> |
|
<head> |
|
<meta charset="UTF-8" /> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
|
<title>Simulador de Investimentos</title> |
|
<style> |
|
body { |
|
font-family: 'Segoe UI', sans-serif; |
|
background-color: #f4f8fb; |
|
margin: 40px; |
|
color: #333; |
|
} |
|
|
|
h1 { |
|
color: #007cf0; |
|
text-align: center; |
|
margin-bottom: 30px; |
|
} |
|
|
|
form { |
|
background-color: #fff; |
|
padding: 25px; |
|
border-radius: 8px; |
|
box-shadow: 0 0 10px rgba(0,0,0,0.05); |
|
max-width: 700px; |
|
margin: 0 auto 40px auto; |
|
} |
|
|
|
label { |
|
display: block; |
|
margin-bottom: 5px; |
|
font-weight: bold; |
|
margin-top: 15px; |
|
} |
|
|
|
input[type="number"] { |
|
width: 100%; |
|
padding: 10px; |
|
font-size: 1em; |
|
border: 1px solid #ccc; |
|
border-radius: 4px; |
|
} |
|
|
|
button { |
|
margin-top: 25px; |
|
padding: 12px 20px; |
|
font-size: 1em; |
|
background-color: #007cf0; |
|
color: white; |
|
border: none; |
|
border-radius: 5px; |
|
cursor: pointer; |
|
} |
|
|
|
button:hover { |
|
background-color: #005ec2; |
|
} |
|
|
|
.center { |
|
text-align: center; |
|
} |
|
|
|
.resultado { |
|
background-color: #fff; |
|
padding: 25px; |
|
border-radius: 8px; |
|
box-shadow: 0 0 10px rgba(0,0,0,0.05); |
|
margin-bottom: 40px; |
|
} |
|
|
|
img { |
|
max-width: 100%; |
|
height: auto; |
|
margin: 30px 0; |
|
} |
|
|
|
.botao-pdf { |
|
background-color: #28a745; |
|
margin-top: 20px; |
|
} |
|
|
|
.botao-pdf:hover { |
|
background-color: #1f8d3a; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
|
|
<h1>Simulador de Investimentos</h1> |
|
|
|
<form method="POST"> |
|
<label>Capital Inicial (R$):</label> |
|
<input type="number" name="capital" step="0.01" required value="{{ capital or '' }}"> |
|
|
|
<label>Retorno Mensal do Studio (%):</label> |
|
<input type="number" name="studio_ret" step="0.01" required value="{{ studio_ret or '' }}"> |
|
|
|
<label>Valorização Anual do Imóvel (%):</label> |
|
<input type="number" name="valorizacao" step="0.01" required value="{{ valorizacao or '' }}"> |
|
|
|
<label>Lucro Anual da Franquia (R$):</label> |
|
<input type="number" name="franquia_ret" step="0.01" required value="{{ franquia_ret or '' }}"> |
|
|
|
<label>Retorno Anual em Ações (%):</label> |
|
<input type="number" name="acoes_ret" step="0.01" required value="{{ acoes_ret or '' }}"> |
|
|
|
<label>Retorno Anual Renda Fixa (%):</label> |
|
<input type="number" name="renda_fixa" step="0.01" required value="{{ renda_fixa or '' }}"> |
|
|
|
<label>Inflação Anual Esperada (%):</label> |
|
<input type="number" name="inflacao" step="0.01" required value="{{ inflacao or '' }}"> |
|
|
|
<div class="center"> |
|
<button type="submit">Simular</button> |
|
</div> |
|
</form> |
|
|
|
{% if grafico %} |
|
<div class="resultado"> |
|
<h2 class="center">Gráfico de Simulação</h2> |
|
<img src="data:image/png;base64,{{ grafico }}" alt="Gráfico de Investimentos"> |
|
|
|
<h2 class="center">Resultados</h2> |
|
{{ tabela|safe }} |
|
|
|
<form method="POST" action="/download_pdf"> |
|
|
|
<input type="hidden" name="capital" value="{{ capital }}"> |
|
<input type="hidden" name="studio_ret" value="{{ studio_ret }}"> |
|
<input type="hidden" name="valorizacao" value="{{ valorizacao }}"> |
|
<input type="hidden" name="franquia_ret" value="{{ franquia_ret }}"> |
|
<input type="hidden" name="acoes_ret" value="{{ acoes_ret }}"> |
|
<input type="hidden" name="renda_fixa" value="{{ renda_fixa }}"> |
|
<input type="hidden" name="inflacao" value="{{ inflacao }}"> |
|
<div class="center"> |
|
<button class="botao-pdf" type="submit">Baixar Relatório em PDF</button> |
|
</div> |
|
</form> |
|
</div> |
|
{% endif %} |
|
|
|
</body> |
|
</html> |
|
|
|
|
|
|