/* Animações e estilos especiais para a página de Tesouraria */

/* Efeitos de hover para cards */
.finance-card {
  transition: all 0.4s ease;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  height: 100%;
  position: relative;
  z-index: 1;
  background: var(--bs-card-bg);
  border: none;
}

.finance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.finance-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(183, 28, 80, 0.2);
}

.finance-card:hover::before {
  opacity: 0.05;
}

.finance-card .card-header {
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.finance-card .card-body {
  padding: 1.5rem;
}

/* Animações para ícones */
.animated-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(183, 28, 80, 0.3);
  transition: all 0.3s ease;
}

.animated-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  top: -100%;
  left: 0;
  border-radius: 50%;
  transition: all 0.5s ease;
}

.animated-icon:hover {
  transform: scale(1.1);
}

.animated-icon:hover::after {
  top: 0;
}

/* Animação para fluxo de dinheiro */
.money-flow {
  position: relative;
  height: 100px;
  overflow: hidden;
  margin: 2rem 0;
  background: linear-gradient(to right, rgba(183, 28, 80, 0.05), rgba(233, 30, 99, 0.05));
  border-radius: 10px;
}

.money-particle {
  position: absolute;
  width: 30px;
  height: 15px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="%23b71c50" d="M64 64C28.7 64 0 92.7 0 128V384c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64zm64 320H64V320c35.3 0 64 28.7 64 64zM64 192V128h64c0 35.3-28.7 64-64 64zM448 384c0-35.3 28.7-64 64-64v64H448zm64-192c-35.3 0-64-28.7-64-64h64v64zM288 160a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>') no-repeat center center;
  background-size: contain;
  animation: money-move 10s linear infinite;
  opacity: 0.7;
}

@keyframes money-move {
  0% {
    transform: translateX(-50px) translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateX(calc(100vw + 50px)) translateY(20px) rotate(360deg);
    opacity: 0;
  }
}

/* Estatísticas com contador */
.stat-counter {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.stat-label {
  font-size: 1rem;
  color: var(--bs-secondary-color);
  margin-bottom: 1.5rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--bs-card-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Gráfico de barras animado */
.chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  margin: 1.5rem 0;
}

.chart-bar {
  width: 12%;
  background: linear-gradient(to top, var(--primary), #e91e63);
  border-radius: 5px 5px 0 0;
  position: relative;
  transition: height 1s ease;
  box-shadow: 0 5px 15px rgba(183, 28, 80, 0.2);
}

.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--bs-body-color);
}

.chart-bar::before {
  content: attr(data-month);
  position: absolute;
  bottom: -45px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

/* Animação para o gráfico circular */
.pie-chart {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0% 30%,
    #e91e63 30% 55%,
    #ff9800 55% 75%,
    #4caf50 75% 100%
  );
  position: relative;
  margin: 2rem auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pie-chart::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: var(--bs-card-bg);
  border-radius: 50%;
}

.pie-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 5px;
}

/* Animação para o botão de ação */
.action-button {
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(183, 28, 80, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
  z-index: -1;
}

.action-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(183, 28, 80, 0.4);
}

.action-button:hover::before {
  left: 100%;
}

/* Animação para o card flutuante */
.floating-card {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Animação para o ícone pulsante */
.pulse-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animação para o texto digitando */
.typing-text {
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  animation: typing 3.5s steps(40, end) forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary) }
}

/* Animação para o card com efeito de vidro */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Animação para o contador */
.counter-animation {
  display: inline-block;
  animation: countUp 2s forwards;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação para o texto destacado */
.highlight-text {
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 30%;
  background-color: rgba(183, 28, 80, 0.2);
  bottom: 0;
  left: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.5s ease;
}

.highlight-text:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Animação para os cards de fluxo financeiro */
.flow-card {
  position: relative;
  overflow: hidden;
}

.flow-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine 6s infinite;
}

@keyframes shine {
  0% {
    transform: rotate(30deg) translate(-100%, -100%);
  }
  100% {
    transform: rotate(30deg) translate(100%, 100%);
  }
}

/* Estilos para tabs de navegação */
.nav-tabs-wrapper {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--bs-body-color);
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tab-button:hover {
  color: var(--primary);
}

.tab-button.active {
  color: var(--primary);
}

.tab-button.active::after {
  transform: scaleX(1);
}

.dashboard-tab {
  display: none;
}

.dashboard-tab.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Estilos para cards de contas */
.account-card {
  background: var(--bs-card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.account-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(183, 28, 80, 0.2);
}

.account-header {
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  color: white;
  padding: 1.25rem;
  display: flex;
  align-items: center;
}

.bank-logo {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
}

.bank-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.account-body {
  padding: 1.25rem;
}

.account-number {
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.account-balance {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.account-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
}

/* Estilos para cards de relatórios */
.report-card {
  background: var(--bs-card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
}

.report-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(183, 28, 80, 0.2);
}

.report-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, #e91e63 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.report-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.report-description {
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Estilos para passos numerados */
.numbered-steps {
  counter-reset: step;
  list-style-type: none;
  padding-left: 0;
}

.numbered-steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  counter-increment: step;
}

.numbered-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Estilos para passos de processo */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-number {
  width: 2rem;
  height: 2rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content {
  flex-grow: 1;
}

.step-content h5 {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Estilos para alertas com ícones */
.alert-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.alert h5 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-align: center;
}

.alert p {
  margin-bottom: 0;
  text-align: center;
}

/* Estilos para imagens com legendas */
.image-container {
  margin-bottom: 1.5rem;
}

.caption {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  font-style: italic;
}

/* Estilos para o modal de transação */
.modal-header {
  display: flex;
  align-items: center;
  padding: 1.25rem;
}

.modal-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.25rem;
}

.modal-title {
  margin-bottom: 0;
  font-weight: 600;
}

/* Responsividade */
@media (max-width: 768px) {
  .animated-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .stat-counter {
    font-size: 2rem;
  }
  
  .chart-container {
    height: 120px;
  }
  
  .pie-chart {
    width: 120px;
    height: 120px;
  }
  
  .nav-tabs-wrapper {
    padding-bottom: 0.25rem;
  }
  
  .tab-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .account-header {
    padding: 1rem;
  }
  
  .bank-logo {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  
  .account-body {
    padding: 1rem;
  }
  
  .account-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .report-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

/* Animação para dark mode */
[data-bs-theme="dark"] .finance-card::before {
  background: linear-gradient(135deg, var(--primary) 0%, #9c27b0 100%);
}

[data-bs-theme="dark"] .animated-icon {
  background: linear-gradient(135deg, var(--primary) 0%, #9c27b0 100%);
  box-shadow: 0 5px 15px rgba(183, 28, 80, 0.5);
}

[data-bs-theme="dark"] .chart-bar {
  background: linear-gradient(to top, var(--primary), #9c27b0);
}

[data-bs-theme="dark"] .action-button {
  background: linear-gradient(135deg, var(--primary) 0%, #9c27b0 100%);
}

/* Script para inicializar as animações */
.init-animation {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.animate {
  opacity: 1;
  transform: translateY(0);
}
