/* =============================================
   CONTROLE DE INVESTIMENTOS — ESTILOS GLOBAIS
   ============================================= */

:root {
  --azul-escuro: #1e3a5f;
  --azul:        #2563eb;
  --azul-claro:  #eff6ff;
  --verde:       #16a34a;
  --verde-claro: #f0fdf4;
  --vermelho:    #dc2626;
  --cinza:       #6b7280;
  --fundo:       #f1f5f9;
  --card-sombra: 0 2px 8px rgba(0,0,0,0.08);
}

body {
  background: var(--fundo);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: #1f2937;
}

/* ---- NAVBAR ---- */
#mainNav {
  background: linear-gradient(135deg, var(--azul-escuro) 0%, #1d4ed8 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  padding: 10px 0;
}
#mainNav .nav-link { color: #bfdbfe !important; font-weight: 500; transition: color .2s; }
#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: #fff !important; }
#mainNav .nav-link.active { border-bottom: 2px solid #60a5fa; }

.taxa-bar { gap: .5rem; }
.badge-taxa {
  background: rgba(255,255,255,0.12);
  color: #e0f2fe;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---- ALERT DIA 5 ---- */
.alert-dia5 {
  background: linear-gradient(90deg, #fef3c7, #fde68a);
  border: none;
  border-bottom: 2px solid #f59e0b;
  font-size: 13px;
}

/* ---- CARDS PRINCIPAIS ---- */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--card-sombra);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }

.card-stat {
  border-left: 4px solid var(--azul);
  padding: 20px;
}
.card-stat .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--cinza); font-weight: 700; }
.card-stat .stat-value { font-size: 26px; font-weight: 800; color: var(--azul-escuro); line-height: 1.2; }
.card-stat .stat-sub   { font-size: 12px; color: var(--cinza); margin-top: 4px; }
.card-stat.verde  { border-left-color: var(--verde); }
.card-stat.verde .stat-value { color: var(--verde); }
.card-stat.roxo   { border-left-color: #7c3aed; }
.card-stat.roxo .stat-value  { color: #7c3aed; }
.card-stat.laranja{ border-left-color: #ea580c; }
.card-stat.laranja .stat-value{ color: #ea580c; }

/* ---- BADGE TIPOS ---- */
.badge-tipo {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.badge-tipo.TESOURO_SELIC  { background: #dbeafe; color: #1e40af; }
.badge-tipo.TESOURO_IPCA   { background: #ede9fe; color: #5b21b6; }
.badge-tipo.TESOURO_RENDA  { background: #fce7f3; color: #9d174d; }
.badge-tipo.BOLSA          { background: #fef3c7; color: #92400e; }
.badge-tipo.POUPANCA       { background: #d1fae5; color: #065f46; }
.badge-tipo.FGTS           { background: #ffedd5; color: #9a3412; }
.badge-tipo.CDB            { background: #e0f2fe; color: #0c4a6e; }
.badge-tipo.CONTA          { background: #f3f4f6; color: #374151; }

/* ---- TABELAS ---- */
.table-inv { font-size: 13px; }
.table-inv th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #64748b; background: #f8fafc; font-weight: 700; }
.table-inv td { vertical-align: middle; }
.table-inv tbody tr:hover { background: #f0f9ff; }

/* ---- VALORES ---- */
.valor-positivo { color: var(--verde); font-weight: 700; }
.valor-negativo { color: var(--vermelho); font-weight: 700; }
.valor-neutro   { color: var(--cinza); }

/* ---- GRÁFICOS ---- */
.chart-container { position: relative; }
.chart-title { font-size: 14px; font-weight: 700; color: var(--azul-escuro); margin-bottom: 12px; }

/* ---- FORMULÁRIOS ---- */
.form-section { background: #fff; border-radius: 12px; padding: 24px; box-shadow: var(--card-sombra); }
.form-label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #374151; }
.input-valor { font-size: 16px; font-weight: 700; color: var(--azul-escuro); }

/* ---- LOGIN PAGE ---- */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo i { font-size: 48px; color: var(--azul); }
.login-logo h1 { font-size: 20px; font-weight: 800; color: var(--azul-escuro); margin: 8px 0 4px; }
.login-logo p { font-size: 12px; color: var(--cinza); }

/* ---- PROGRESSO DE VENCIMENTO ---- */
.vencimento-bar { height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; margin-top: 4px; }
.vencimento-fill { height: 100%; background: linear-gradient(90deg, var(--verde), #22c55e); border-radius: 3px; }

/* ---- ANIMAÇÕES ---- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s ease-out forwards; }

/* ---- MODAL IMPORTAR ---- */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: #f8fafc;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--azul); background: var(--azul-claro); }
.drop-zone i { font-size: 40px; color: #94a3b8; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .taxa-bar { display: none !important; }
  .card-stat .stat-value { font-size: 20px; }
  .container-fluid { padding: 0 12px; }
}

/* ---- SCROLLBAR PERSONALIZADA ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* ---- FOOTER ---- */
.page-footer {
  margin-top: 40px;
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  border-top: 1px solid #e2e8f0;
}
