/**
 * MAVEN SCORE UI CSS v5.1
 * Estilos premium para Score de Saúde Financeira
 * Padrão: Mercury Bank + Linear + Notion
 */

/* ========================================
   HEADER
======================================== */

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.score-header h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
  margin: 0 0 6px 0;
}

.score-header p {
  font-size: 14px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.6));
  margin: 0;
}

/* ========================================
   SCORE MAIN CARD
======================================== */

.score-main-card {
  background: linear-gradient(135deg, rgba(26, 46, 30, 0.15) 0%, rgba(15, 25, 18, 0.15) 100%);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 32px;
  display: flex;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}

.score-circle-container {
  flex-shrink: 0;
}

.score-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: scoreAppear 0.8s ease;
}

@keyframes scoreAppear {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.score-circle-inner {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--bg, #0a0f0c);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.score-icone {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
}

.score-pontos {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-primary, #f9f6ef);
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}

.score-max {
  font-size: 14px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.5));
  font-weight: 600;
}

.score-info {
  flex: 1;
  min-width: 300px;
}

.score-nivel {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.score-descricao {
  font-size: 16px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.7));
  margin-bottom: 24px;
}

.score-progresso-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progresso-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-progresso-texto {
  font-size: 13px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.6));
  margin-bottom: 24px;
}

/* ========================================
   BONUS E PENALIDADES
======================================== */

.score-bonus {
  background: rgba(26, 46, 30, 0.08);
  border: 1px solid rgba(26, 46, 30, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.bonus-titulo {
  font-size: 13px;
  font-weight: 700;
  color: #1a2e1e;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bonus-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.bonus-nome {
  color: var(--text-primary, #f9f6ef);
}

.bonus-valor {
  color: #1a2e1e;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

.score-penalidades {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.penalidade-titulo {
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.penalidade-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.penalidade-nome {
  color: var(--text-primary, #f9f6ef);
}

.penalidade-valor {
  color: #ef4444;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
}

/* ========================================
   SECTIONS
======================================== */

.score-section {
  margin-bottom: 40px;
}

.score-section h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
  margin-bottom: 24px;
}

/* ========================================
   BREAKDOWN
======================================== */

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.breakdown-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.2s ease;
}

.breakdown-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.breakdown-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.breakdown-icone {
  font-size: 32px;
  line-height: 1;
}

.breakdown-info {
  flex: 1;
  min-width: 0;
}

.breakdown-nome {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
  margin-bottom: 6px;
}

.breakdown-pontos {
  font-family: 'DM Sans', sans-serif;
}

.pontos-atual {
  font-size: 24px;
  font-weight: 700;
  margin-right: 4px;
}

.pontos-max {
  font-size: 14px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.5));
  font-weight: 600;
}

.breakdown-barra {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.breakdown-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.breakdown-percentual {
  text-align: right;
  font-size: 12px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.6));
  font-weight: 600;
}

/* ========================================
   CONQUISTAS
======================================== */

.conquistas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.conquista-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.conquista-card.desbloqueada {
  background: rgba(201, 168, 76, 0.08);
  border-color: rgba(201, 168, 76, 0.3);
}

.conquista-card.bloqueada {
  opacity: 0.4;
  filter: grayscale(100%);
}

.conquista-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.conquista-icone {
  font-size: 40px;
  margin-bottom: 12px;
}

.conquista-nome {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
  margin-bottom: 6px;
}

.conquista-descricao {
  font-size: 12px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.6));
  margin-bottom: 10px;
  line-height: 1.4;
}

.conquista-pontos {
  font-size: 13px;
  font-weight: 700;
  color: #c9a84c;
  font-family: 'DM Sans', sans-serif;
}

.conquista-bloqueio {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 20px;
}

/* ========================================
   PRÓXIMOS PASSOS
======================================== */

.proximo-nivel {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.nivel-atual,
.nivel-proximo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.nivel-atual span:first-child,
.nivel-proximo span:first-child {
  font-size: 32px;
}

.nivel-atual span:last-child,
.nivel-proximo span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
}

.nivel-seta {
  font-size: 24px;
  color: var(--text-secondary, rgba(249, 246, 239, 0.5));
}

.nivel-falta {
  flex: 1;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: #c9a84c;
}

.nivel-maximo {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(26, 46, 30, 0.08) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 14px;
  margin-bottom: 24px;
}

.maximo-icone {
  font-size: 64px;
  margin-bottom: 16px;
}

.maximo-texto {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary, #f9f6ef);
}

/* ========================================
   DICAS
======================================== */

.dicas-container {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.dicas-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 16px;
}

.dicas-lista {
  display: grid;
  gap: 12px;
}

.dica-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dica-icone {
  width: 20px;
  height: 20px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}

.dica-texto {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary, #f9f6ef);
  line-height: 1.5;
}

/* ========================================
   AÇÕES RÁPIDAS
======================================== */

.acoes-rapidas {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 14px;
  padding: 24px;
}

.acoes-titulo {
  font-size: 16px;
  font-weight: 700;
  color: #c9a84c;
  margin-bottom: 16px;
}

.acao-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acao-card:last-child {
  margin-bottom: 0;
}

.acao-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(201, 168, 76, 0.4);
  transform: translateX(4px);
}

.acao-texto {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary, #f9f6ef);
  font-weight: 500;
}

.acao-ganho {
  padding: 6px 12px;
  background: rgba(201, 168, 76, 0.15);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #c9a84c;
  font-family: 'DM Sans', sans-serif;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
  .score-main-card {
    flex-direction: column;
    padding: 24px;
    gap: 24px;
  }

  .score-circle {
    width: 160px;
    height: 160px;
  }

  .score-circle-inner {
    width: 140px;
    height: 140px;
  }

  .score-icone {
    font-size: 36px;
  }

  .score-pontos {
    font-size: 40px;
  }

  .breakdown-grid {
    grid-template-columns: 1fr;
  }

  .conquistas-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .proximo-nivel {
    flex-direction: column;
    gap: 12px;
  }

  .nivel-falta {
    text-align: center;
  }
}
