/* ==========================================
   ESTILOS PARA SIMULADORES
   ========================================== */

/* Calculadora Wrapper */
.calculadora-wrapper {
  max-width: 800px;
  margin: 0 auto 0;
}

.calculadora-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.card-header h2 {
  font-size: 2rem;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-weight: 600;
  pointer-events: none;
  font-size: 1rem;
}

.input-wrapper input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
  color: #d1d5db;
}

/* Subtotales */
.subtotal-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  font-size: 1rem;
}

.subtotal-box.ingreso {
  background: #ecfdf5;
  border: 2px solid #a7f3d0;
  color: #065f46;
}

.subtotal-box.gasto {
  background: #fef2f2;
  border: 2px solid #fecaca;
  color: #991b1b;
}

.subtotal-box strong {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Botón Calcular */
.btn-calc {
  width: 100%;
  padding: 1.125rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Resultados */
.resultados {
  max-width: 800px;
  margin: 0.5rem auto;
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resultado-principal {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 3px solid #667eea;
}

.resultado-principal h2 {
  font-size: 1.75rem;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
  text-align: center;
}

.resultado-grid {
  display: grid;
  gap: 1.5rem;
}

.resultado-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.resultado-item:last-child {
  border-bottom: none;
}

.resultado-item.destacado {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
  border-radius: 12px;
  border-bottom: none;
  margin-top: 0.5rem;
}

.resultado-label {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
}

.resultado-item.destacado .resultado-label {
  color: #1f2937;
  font-weight: 600;
  font-size: 1.125rem;
}

.resultado-valor {
  font-size: 1.75rem;
  font-weight: 700;
}

.resultado-valor.positivo {
  color: #10b981;
}

.resultado-valor.negativo {
  color: #ef4444;
}

.resultado-item.destacado .resultado-valor {
  font-size: 2.25rem;
  color: #667eea;
}

/* Distribución */
.distribucion-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.distribucion-section h3 {
  font-size: 1.5rem;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
}

.distribucion-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dist-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.dist-porcentaje {
  color: #667eea;
  font-size: 1.125rem;
}

.progress-bar {
  width: 100%;
  height: 28px;
  background: #f3f4f6;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
}

.progress-fill.fijos {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.progress-fill.variables {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.disponible {
  background: linear-gradient(90deg, #10b981, #059669);
}

.dist-monto {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: right;
}

/* Recomendaciones */
.recomendaciones-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.recomendaciones-section h3 {
  font-size: 1.5rem;
  color: #1f2937;
  margin: 0 0 1.5rem 0;
}

#recomendaciones-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recomendacion-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid;
  background: #f9fafb;
}

.recomendacion-item.success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.recomendacion-item.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.recomendacion-item.danger {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.recomendacion-item.info {
  border-left-color: #667eea;
  background: #f0f4ff;
}

.recomendacion-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  line-height: 1;
}

.recomendacion-text {
  flex: 1;
}

.recomendacion-text strong {
  display: block;
  margin-bottom: 0.375rem;
  color: #1f2937;
  font-size: 1rem;
}

.recomendacion-text p {
  margin: 0;
  color: #4b5563;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Guía de Uso */
.guia-uso {
  max-width: 1000px;
  margin: 0 auto 3rem;
}

.guia-uso h2 {
  font-size: 2rem;
  text-align: center;
  color: #1f2937;
  margin-bottom: 2rem;
}

.pasos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.paso-item {
  background: white;
  padding: 1.75rem;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.paso-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.paso-numero {
  width: 48px;
  height: 48px;
  border:solid #0f172a 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.paso-item h3 {
  font-size: 1.125rem;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.paso-item p {
  color: #6b7280;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

.consejos-box {
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.consejos-box h3 {
  font-size: 1.5rem;
  margin: 0 0 1.25rem 0;
}

.consejos-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.consejos-box li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.consejos-box li:before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Otros Simuladores */
.otros-simuladores {
  margin-top: -90px;
}

.otros-simuladores h2 {
  font-size: 2rem;
  text-align: center;
  color: #1f2937;
  margin-bottom: 2rem;
  margin-top: 25px;
}

.simuladores-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.simulador-mini-card {
  background: white;
  padding: 1.75rem;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.simulador-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.simulador-mini-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.simulador-mini-card h3 {
  font-size: 1.25rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.simulador-mini-card p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .calculadora-card {
    padding: 1.5rem;
  }

  .resultado-principal {
    padding: 1.5rem;
  }

  .resultado-principal h2 {
    font-size: 1.5rem;
  }

  .resultado-valor {
    font-size: 1.5rem;
  }

  .resultado-item.destacado .resultado-valor {
    font-size: 1.875rem;
  }

  .pasos-grid {
    grid-template-columns: 1fr;
  }

  .simuladores-mini-grid {
    grid-template-columns: 1fr;
  }
}

.mensaje-alerta {
  padding: 12px 16px;
  margin-top: 20px;
  border-radius: 8px;
  font-weight: 500;
}

.mensaje-alerta.error {
  background-color: #ffe5e5;
  color: #b00020;
  border: 1px solid #ffb3b3;
}

.mensaje-alerta.warning {
  background-color: #fff4cc;
  color: #8a6d00;
  border: 1px solid #ffe08a;
}
