feat: trading terminal live rates + fix spread negativo + fix USD→BRL

- Adiciona widget de cotações ao vivo (USD/BRL e EUR/BRL) com design
  estilo terminal de trading (dark theme, tipografia mono, glow effects)
- Proxy server-side /api/cotacao com cache 3s e token AwesomeAPI
- Auto-refresh a cada 3 segundos apenas quando a página está aberta
- Corrige cálculo de spread negativo: remove Math.abs() em USD→BRL
  e Math.max(0,...) no spread líquido
- Corrige seção USD→BRL que não aparecia (filtro status !== 'finalizado')
- Corrige valor_reais no fluxo USD→BRL: agora calcula valor * cotação
- Adiciona classe CSS spread-negative para destacar spreads negativos
- Bandeiras de fluxo (BR/US/EU) nos botões de compra e venda

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-10 22:30:43 -05:00
parent 1ad28f54dd
commit 7ee15ad5e5
12 changed files with 1285 additions and 436 deletions

View File

@@ -136,6 +136,22 @@
font-size: 12px;
color: var(--text-secondary);
}
/* Mobile responsive */
@media (max-width: 480px) {
.login-container { padding: 16px; }
.login-card { padding: 28px 24px; border-radius: 12px; }
.login-header { margin-bottom: 24px; }
.login-header .logo { width: 140px; margin-bottom: 16px; }
.login-header .app-name { font-size: 16px; padding: 6px 16px; }
.login-header .subtitle { font-size: 10px; letter-spacing: 1.5px; }
.form-group { margin-bottom: 16px; }
.form-group label { font-size: 11px; }
.form-group input { padding: 11px 14px; font-size: 14px; border-radius: 8px; }
.btn-login { padding: 12px; font-size: 14px; border-radius: 8px; }
.error-msg { font-size: 12px; padding: 10px 12px; }
.footer { margin-top: 20px; font-size: 11px; }
}
</style>
</head>
<body>